looking for expertise

klappnase klappnase at web.de
Wed Mar 2 12:37:14 EST 2005


"Neil Hodgson" <nhodgson at bigpond.net.au> wrote in message news:<6OhVd.181308$K7.110939 at news-server.bigpond.net.au>...
> Michael:
> 
> > 5. file operations seem to be delicate; at least I got an error when I
> > passed a filename that contains special characters as unicode to
> > os.access(), so I guess that whenever I do file operations
> > (os.remove(), shutil.copy() ...) the filename should be encoded back
> > into system encoding before;
> 
>    This can lead to failure on Windows when the true Unicode file name can
> not be encoded in the current system encoding.
> 
>    Neil

Like I said, it's only supposed to run on linux; anyway, is it likely
that problems will arise when filenames I have to handle have
basically three sources:

1. already existing files

2. automatically generated filenames, which result from adding an
ascii-only suffix to an existing filename (like xy --> xy_bak2)

3. filenames created by user input

?
If yes, how to avoid these?

Any hints are appreciated

Michael



More information about the Python-list mailing list