Re: unicode + xml

2009-09-10 Thread Laurent Luce
Laurent Luce wrote: Can someone confirm that the issue here is I need to encode the xml data using: # encode as UTF-8 utf8_string = xml.encode( 'utf-8' ) and then post it to the server. Well, since you declared it to be UTF-8, it must be UTF-8 encoded. However, your question seems to imply

Re: unicode + xml

2009-09-08 Thread Laurent Luce
Can someone confirm that the issue here is I need to encode the xml data using: # encode as UTF-8 utf8_string = xml.encode( 'utf-8' ) and then post it to the server. Laurent - Original Message From: Laurent Luce laurentluc...@yahoo.com To: Mark Tolonen metolone+gm...@gmail.com; python

unicode + xml

2009-09-07 Thread Laurent Luce
Hello, I am trying to do the following: - read list of folders in a specific directory: os.listdir() - some folders have Japanese characters - post list of folders as xml to a web server: I used content-type 'text/xml' and I use '?xml version=1.0 encoding=utf-8?' to start the xml data. - on

Re: unicode + xml

2009-09-07 Thread Laurent Luce
...@gmail.com To: python-list@python.org Sent: Monday, September 7, 2009 9:15:15 PM Subject: Re: unicode + xml Laurent Luce laurentluc...@yahoo.com wrote in message news:255473.44957...@web54203.mail.re2.yahoo.com... Hello, I am trying to do the following: - read list of folders in a specific

windows explorer integration

2009-07-10 Thread Laurent Luce
Hello, Do you know if it is possible to write a plugin for windows explorer using win32 module ? The idea is to modify the way the folders/files are displayed in the explorer window and also to provide some controls. Laurent -- http://mail.python.org/mailman/listinfo/python-list

strip char from list of strings

2009-05-19 Thread Laurent Luce
I have the following list: [ 'test\n', test2\n', 'test3\n' ] I want to remove the '\n' from each string in place, what is the most efficient way to do that ? Regards, Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: strip char from list of strings

2009-05-19 Thread Laurent Luce
I had a simple loop stripping each string but I was looking for something concise and efficient. I like the following answer: x = [s.rstrip('\n') for s in x] David Stanek wrote: On Mon, May 18, 2009 at 3:30 PM, Laurent Luce laurentluc...@yahoo.com wrote: I have the following list: [ 'test\n

Re: strip char from list of strings

2009-05-19 Thread Laurent Luce
Thanks Casey. I like your solution. Casey Webster wrote: On May 18, 3:30 pm, Laurent Luce laurentluc...@yahoo.com wrote: I have the following list: [ 'test\n', test2\n', 'test3\n' ] I want to remove the '\n' from each string in place, what is the most efficient way to do that ? Regards