uniicode and executing a process with subprocess.call, or os.system

Chris Rebert clp2 at rebertia.com
Sat Jul 18 19:06:51 EDT 2009


On Sat, Jul 18, 2009 at 3:30 PM, Rick King<rickbking at comcast.net> wrote:
> Hello,
> I want to copy files using subprocess.call or os.system where the file names
> are non-ascii, e.g. Serbian(latin), c's and s's with hacheks,etc. Windows
> stores all the file names in unicode so they are displayed ok in explorer,
> and I can read them into my program with listdir(u'.'), etc. and work with
> the names in the program.

You should try one of the copying functions in the shutil module
instead, it'll be much simpler than using subprocess:
http://docs.python.org/library/shutil.html

Cheers,
Chris
-- 
http://blog.rebertia.com



More information about the Python-list mailing list