[python-win32] win32api.FindFiles hangs

Jim Bell Jim at JC-Bell.com
Thu Dec 6 05:44:05 EST 2018


Maybe it's not your installation of Windows that's messed up, but just a 
third party driver. Or someone has mis-configured something on the server.

This net share Z: drive: what's the technology / software that's behind 
it? Is it a standard Windows share, or a third-party driver? (If it's a 
standard Windows share, is it a Microsoft server doing the sharing?)


On 2018-12-05 1:00 PM, Boylan, Ross wrote:
> The problem doesn't seem to be python-specific; it appears the underlying FindNext function in the Windows API just keeps returning the same file name instead of moving on.
>
> ...
> This seems both bizarre and a sign that my installation of Windows (not python for windows) is pretty messed up.
>
> Ross
>
> ________________________________________
> From: python-win32 <python-win32-bounces+ross.boylan=ucsf.edu at python.org> on behalf of ckkart at hoc.net <ckkart at hoc.net>
> Sent: Wednesday, December 5, 2018 6:48:21 AM
> To: python-win32 at python.org
> Subject: Re: [python-win32] win32api.FindFiles hangs
>
> Works just fine on my windows7 machine with python2.7 64bit and
> pywin32-221
> It yields results for both existing and non existing files.
>
> Christian
>
> Am 2018-12-05 01:20, schrieb Ross.Boylan at ucsf.edu:
>> win32api.FindFiles() works when the argument is "*" or "*.py".  It
>> works, in the sense of returning an empty list, if the argument is a
>> random name not present in the directory.  But it fails with
>> "BSTImport.py", as well as the name of every file in the directory
>> that I've tried.
>> ________________________________________
>> From: Boylan, Ross
>> Sent: Tuesday, December 4, 2018 5:12 PM
>> To: python-win32 at python.org
>> Subject: win32api.FindFiles hangs (was COM registration hangs up: 32
>> bit Python 3.7 on 64 bit Win 7)
>>
>> I tried using my 64 bit Python 3.6 and ran into the same problem.
>> Tracing through with pdb, the following line seems to be where it hung
>> up:
>>> c:\program
>>> files\python36\lib\site-packages\win32com\server\register.py(419)RegisterClasses()
>> -> moduleName =
>> os.path.splitext(win32api.FindFiles(sys.argv[0])[0][8])[0]
>> (Pdb) n
>>
>> Is this some kind of string conversion issue?  My installation is
>> borked?
>> Manual debugging statements show sys.argv[0] is 'BSTImport.py'.
>>
>> win32api.FindFiles('BSTImport.py')
>> in a python 3.7 shell (32 bit) hangs.
>>
>> I think I installed pywin32 via pip.
>> _______________________________________________
>> python-win32 mailing list
>> python-win32 at python.org
>> https://mail.python.org/mailman/listinfo/python-win32
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> https://mail.python.org/mailman/listinfo/python-win32
>


More information about the python-win32 mailing list