[Simon Dahlbacka] | | On 6/30/05, Tim Golden <[EMAIL PROTECTED]> wrote: | > [Simon Dahlbacka] | > | I'm having trouble with the fact that | > | win32file.FindFirstChangeNotification seems to not like | network paths. | > | > I don't quite understand why this is happening, but to | > answer your most direct question, here's a snippet of | > code which may help: | >
[.. snip code using NetUseEnum ..] | thanks, I tried your code, but it seems | win32net.NetUseEnum(None, 0, resume) | just returns ([], 0, 0) all the time !?! ..and thus it does not work. | An ordinary "net use" issued in the cmd window yields the correct | information though.. (they seem to be NetWare Services though, if that | matters?) It works ok on my machine, so I can only imagine that the NetWare shares are to blame. If net use is working, it should be possible to parse its output fairly easily. Something like: <code> import os net_use_lines = os.popen ("net use").read ().splitlines () useful_lines = net_use_lines[6:-2] for line in useful_lines: status, letter, share, backend = line[:13], line[13:23], line[23:49], line[49:] if share.startswith (r'\\voapps\d'): print letter break </code> Bit crude, and obviously relies on the layout of the net use output, but at least it's a starting point. TJG ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32