On 06/09/12 00:51, Ray Jones wrote:

subprocess.call(['dolphin', '/my_home/testdir/\u044c\u043e\u0432'])

Dolphin's error message: 'The file or folder
/my_home/testdir/\u044c\u043e\u0432 does not exist'

That's because you're telling Dolphin to look for a file literally called:

BACKSLASH u ZERO FOUR FOUR c BACKSLASH ...

Either use the actual unicode string, which you can write like either of
these:

u'/my_home/testdir/ьов'
u'/my_home/testdir/\u044c\u043e\u0432'


(note the leading u' delimiter, not just ')

or try using the raw bytes instead:

'/my_home/testdir/\xd1\x8c\xd0\xbe\xd0\xb2'

(assuming Dolphin is using UTF-8) and hope Dolphin can decode them
correctly. (It better.)



--
Steven
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to