Bug in win32file.FindFilesW ?
Werner Merkl
werner.merkl at fujitsu-siemens.de
Thu Nov 28 05:44:33 EST 2002
Hi everyone,
like more of you, I like python and I like -- or better NEED -- to use it
within windows. Some of the functions of module "os" has some
known problems with unicode, used as file name or directory name.
So I tried to replace it with some windows extention modules.
And most of them work fine. But...
Is the following behaviour of win32file.FindFileW as expected?
If not, is it my fault?
If not so, is it a bug?
And if it was a bug, where should I send it to?
PythonWin 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32 bit (Intel)] on win32.
Portions Copyright 1994-2001 Mark Hammond (mhammond at skippinet.com.au) - see
'Help/About PythonWin' for further copyright information.
>>> dir = u'\u03b1\u03b2\u03b3.DIR'
>>> import win32file as f
>>> f.CreateDirectoryW(dir, None)
>>> from os.path import join as j
>>> f.CreateFileW(j(dir,'1'),0,0,None,f.CREATE_NEW,0,None)
<PyHANDLE object at 0x00F8C8E4>
>>> f.CreateFileW(j(dir,'2'),0,0,None,f.CREATE_NEW,0,None)
<PyHANDLE object at 0x00FA4F14>
>>> f.FindFilesW(dir)
Traceback (most recent call last):
File "<interactive input>", line 1, in ?
UnicodeError: ASCII encoding error: ordinal not in range(128)
!!!! BTW: ">>> f.SetCurrentDirectory(dir)" brings also an ERROR!!!!
Thanx in advance
Regards/Mir freundlichen Grüßen
Werner Merkl
More information about the Python-list
mailing list