venutaurus...@gmail.com wrote:
Thank you Sir for your reply. It is working for me. But is failing if
I have Unicode characters in my path. I tried giving a 'u' in front of
the path but still it fails at f.createdat. Does it support Unicode
Characters?
This the traceback which I got while running the above python script
on my data:
-----------------------------------
\\?\C:\JPDump\AGIT_FSDM\Unicode\Arabic files\ArabicְדזךמאּשּׁïŠ
ï„ïŽï‰ï�כּטּךּאָשּׁïŒïŽ×°×²×´×˜×¦×ª×�
In fact, to give me something to test against, would you
be able to send me the result of running this code, please?
It's just listing the names of the files under that particular
directly, encoded as utf8 so they'll survive transit:
<code>
import os
from winsys import fs
PATH = r"\\?\C:\JPDump\AGIT_FSDM\Unicode\Arabic files"
f = open ("arabic-files.txt", "wb")
for filename in fs.listdir (PATH):
f.write (filename.encode ("utf8") + "\r\n")
f.close ()
os.startfile ("arabic-files.txt")
</code>
Thanks
TJG
--
http://mail.python.org/mailman/listinfo/python-list