[python-win32] Python service needs to access network resources

Roberto Aguilar roberto.c.aguilar at gmail.com
Wed Apr 20 05:02:34 CEST 2011


On Apr 19, 2011, at 5:48 PM, Chris Bennett wrote:
> I have been trying to figure this out for weeks now.
> I have made a simply Python service on my local computer, but it needs to import a module from the network.
> I have tried appending the UNC of the folder to the path but it still says "there is no module named X"
> Then when I tried running the service logged on as NT AUTHORITY\NetworkService it cannot find my service object, even if I point to it with UNC in the registry.
> I am running out of ideas. Does anybody have any suggestions? Is it a firewall issue?
> 
> Windows XP. Python 2.5. 

Have you tried running the script that imports the module as a stand alone program and _not_ as a service?  Can it access the network module?

Can os.listdir(unc_path) list the directory?

I assume, when you say appending the UNC to the path you mean sys.path?

Have you tried mapping the network drive to a drive letter and adding that to the path?

If the module is on the local machine does it import properly?

-Roberto.



More information about the python-win32 mailing list