| Jerub | libraries mostly. |
| triplah_w | anyone know how to get mysqldb to accept utf-8 queries? |
| Jerub | triplah_w: set the encoding and collation of the tables and the connection? at one point it was utf-8+sweedish. |
| TFKyle | I think if you set the default charset to utf-8 it'll work, havn't tried it though |
| Jerub | (by default) |
| triplah_w | well when i use sqlobject i'm getting ascii cant encode blah blah and when i use MySQLdb's dbapi i get latin-1 can encode blah |
| Jerub | convert from unicode to utf-8 first. |
| triplah_w | i am exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 73: ordinal not in range(128) |
| TFKyle | does it work with unicode strings? |
| triplah_w | the string s are unicode i'm encoding them to utf-8 same problem both ways |
| TFKyle | well, I meant unicode objects |
| triplah_w | oh i'll try wait, my helper converts to unicode then encodes in utf8 this is a show stopped at the moment :\ stopper* |
| whitenoyce | Does python have an automated form filling out web bot? |
| Jerub | twill is nice for that kind of sausage. |
| triplah_w | this is annoying so tempted to use sqlite for everything |
| sharms | can I read and write to the same file handle? Like read in the file, then rewrite its contents? |
| triplah_w | close it and reopen with mode "w" |
| sharms | ok so opening it "rw" wont cut it |
| triplah_w | think about what you are asking :P does it matter that much? |
| sharms | yeah one makes me write 3 more lines of code |
| triplah_w | if you are worried about 3 lines of code you really shouldbe programming you can seek the begining of the file if you really want to do it with the same filehandle but i bet that will be more lines of code than reopening it or about the same at least anway |
| sharms | I did that but it tells me it is a bad file descriptor, I am seeking to position 0 |
| triplah_w | contents = open(f,'r').read() open(f,'w').write(contents) two lines |