View Single Post
Old 01-22-2011, 04:54 AM   #59
pchrist7
Addict
pchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animals
 
pchrist7's Avatar
 
Posts: 385
Karma: 6514
Join Date: Aug 2010
Location: Denmark
Device: Kindle 3 3G+Wifi, Oasis
Thumbs up Got it !

Quote:
Originally Posted by chaley View Post
You can do it.

I haven't tried it, so it might not compile. Should be close.

I changed the regexp in the re(...) clause to carve out both the date and the percent. If it finds them, then the ifs below choose what to return.

Have fun.
Hi Chaley
You were SO close !
All I had to do was add .* in re.match since the date is not at the start of comments. RTFM helped with that one
Bit tricky to find. Added more return strings to determine that mg was empty.
Now I know what I wish for my birthday: python debugger, line by line, integrated in Calibre
I know, keep dreaming.
How do you debug ? Just looking, trying, etc. ?

@beckywc: Will post my suggestions for you shortly.
pchrist7 is offline   Reply With Quote