#python - Mon 19 Mar 2007 between 20:02 and 20:11

NY Lost Funds



PeperYhg1s: won't work for negative no.
Zalevilgod99 ESC-1
Yhg1sPeper: indeed it will not.
erwin85Zal, Yhg1s it works. Thanks!
Pepermaybe a = abs(a - int(a)) ?
if there is no such function already
yihurm, I seem to be losing information when storing a zlib compressed object into a BLOB field in a sqlite database
should I be storing it as TEXT?
JosefAssadgah, strings still looking b0rked; Charg(e) de projet, Coopration au dveloppement
Yhg1sJosefAssad: looks fine here. what you pasted is UTF-8.
CJLucasi cant figure out how to use * with re.split
Yhg1sCJLucas: the same way you would use it in other regular expressions.
JosefAssadYhg1s: I just noticed that too. I tried pasting it into a GUI app. How odd.
CJLucasbut it doesnt seem to be working
its not spliting correctly
polpakCJLucas: how are you trying to split
and what's the string you're splitting
CJLucas>>> re.split("<td class='*'>",line[3])
["Real Time With Bill Maher</td><td class='longnumber'>05x05</td><td class='episodetitle'>Episode 505</td></tr><tr>"]
JosefAssadbloody hell, even looks right in my rss aggregator. wish I didn't have to use the reload(sys) hack
yiYhg1s: any idea how to store compressed strings in a sqlite db?
polpakCJLucas: you need to read how * works in regexp
Yhg1syi: in a BLOB, I would say.
CJLucaspolpak: i thought it worked the same as * normally does
yiYhg1s: that is what I tried. The data I put in is different then what I get out
polpakCJLucas: that's going to match <td class= followed by zero or more ' characters followed by a '>
Yhg1sCJLucas: * in a regexp means 'repeat the previous character any number of times'
yiYhg1s: I am pickling the object and then calling zlib.compress() on it
polpakCJLucas: which isn't what you want
yiYhg1s: any idea how that might happen?
CJLucasahh
Phoenix^CJLucas, you want '.*'
Yhg1syi: nope, sorry. you'll have to debug it.
polpakCJLucas: try <td class='[^']*'>
CJLucasill try both :P
Phoenix^. is any character
Yhg1sCJLucas: polpak has it right, in this case. you don't want to match another '.
CJLucashmmm
Phoenix^so it half implements regex on split()
?

Page: 1 8 15 22 29 36 43 50 57 64 71 78 85 

IrcArchive

NY Lost Funds