Re: Unicode File Names

2008-10-18 Thread Mark Tolonen
""Martin v. Löwis"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Oddly, os.getcwd() and os.getcwdu() both still exist in Python 3.0. Since the behavior is now identical it seems os.getcwdu() should be dropped. It is dropped, and os.getcwdb() has been added. Must be changed po

Re: Unicode File Names

2008-10-18 Thread Martin v. Löwis
> Oddly, os.getcwd() and os.getcwdu() both still exist in Python 3.0. > Since the behavior is now identical it seems os.getcwdu() should be > dropped. It is dropped, and os.getcwdb() has been added. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode File Names

2008-10-18 Thread Mark Tolonen
"Jordan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] l = os.listdir(unicode(os.getcwd())) Other options to get the same result: l = os.listdir(os.getcwdu()) l = os.listdir(u'.') Oddly, os.getcwd() and os.getcwdu() both still exist in Python 3.0. Since the behavior is now

Re: Unicode File Names

2008-10-18 Thread John Machin
On Oct 18, 5:57 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > Should the note be removed, or should it say something like "Unicode > > file names are supported. New in Python 2.6."? Is there anything else > > that should be mentioned? > > The note should be corrected, documenting the behavio

Re: Unicode File Names

2008-10-18 Thread Martin v. Löwis
> Should the note be removed, or should it say something like "Unicode > file names are supported. New in Python 2.6."? Is there anything else > that should be mentioned? The note should be corrected, documenting the behaviour implemented. > More on cp437: I see where you mentioned to the patch a

Re: Unicode File Names

2008-10-17 Thread John Machin
On Oct 17, 6:32 pm, "Martin v. Lo"wis" <[EMAIL PROTECTED]> wrote: > > Step 4: Either wait for Python 2.7 or apply the patch to your own copy > > of zipfile ... > > Actually, this is released in Python 2.6, see r62724. Hi Martin, That's good. I was lead astray by the fact that the 2.6 docs still c

Re: Unicode File Names

2008-10-17 Thread Martin v. Lo
> Step 4: Either wait for Python 2.7 or apply the patch to your own copy > of zipfile ... Actually, this is released in Python 2.6, see r62724. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode File Names

2008-10-16 Thread John Machin
On Oct 17, 2:56 pm, Jordan <[EMAIL PROTECTED]> wrote: > I'm not quite sure now if the problem is me, windows, or zipfile > (which I kinda failed to mention before). Using > os.listdir(unicode(os.listdir())) You mean os.listdir(unicode(os.getcwd())), I presume. > seems to have been a step in the

Re: Unicode File Names

2008-10-16 Thread Jordan
On Oct 16, 10:18 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Oct 17, 12:52 pm, Jordan <[EMAIL PROTECTED]> wrote: > > > > > On Oct 16, 9:20 pm, John Machin <[EMAIL PROTECTED]> wrote: > > > > On Oct 17, 11:43 am, Jordan <[EMAIL PROTECTED]> wrote: > > > > > I've got a bunch of files with Japanese

Re: Unicode File Names

2008-10-16 Thread Jordan
On Oct 16, 10:18 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Oct 17, 12:52 pm, Jordan <[EMAIL PROTECTED]> wrote: > > > > > On Oct 16, 9:20 pm, John Machin <[EMAIL PROTECTED]> wrote: > > > > On Oct 17, 11:43 am, Jordan <[EMAIL PROTECTED]> wrote: > > > > > I've got a bunch of files with Japanese

Re: Unicode File Names

2008-10-16 Thread John Machin
On Oct 17, 12:52 pm, Jordan <[EMAIL PROTECTED]> wrote: > On Oct 16, 9:20 pm, John Machin <[EMAIL PROTECTED]> wrote: > > > > > On Oct 17, 11:43 am, Jordan <[EMAIL PROTECTED]> wrote: > > > > I've got a bunch of files with Japanese characters in their names and > > > os.listdir() replaces those charac

Re: Unicode File Names

2008-10-16 Thread Chris Rebert
2008/10/16 Jordan <[EMAIL PROTECTED]>: > On Oct 16, 9:20 pm, John Machin <[EMAIL PROTECTED]> wrote: >> On Oct 17, 11:43 am, Jordan <[EMAIL PROTECTED]> wrote: >> >> > I've got a bunch of files with Japanese characters in their names and >> > os.listdir() replaces those characters with ?'s. I'm tryin

Re: Unicode File Names

2008-10-16 Thread Jordan
On Oct 16, 9:20 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Oct 17, 11:43 am, Jordan <[EMAIL PROTECTED]> wrote: > > > I've got a bunch of files with Japanese characters in their names and > > os.listdir() replaces those characters with ?'s. I'm trying to open > > the files several steps later,

Re: Unicode File Names

2008-10-16 Thread Seun Osewa
Try Python 3. Python 3 strings are native by default, so the os.listdir() in Python 3 should support the Japanese characters. On Oct 17, 1:43 am, Jordan <[EMAIL PROTECTED]> wrote: > I've got a bunch of files with Japanese characters in their names and > os.listdir() replaces those characters with

Re: Unicode File Names

2008-10-16 Thread John Machin
On Oct 17, 11:43 am, Jordan <[EMAIL PROTECTED]> wrote: > I've got a bunch of files with Japanese characters in their names and > os.listdir() replaces those characters with ?'s. I'm trying to open > the files several steps later, and obviously Python isn't going to > find '01-.jpg' (formally '0