Importing module from network

Jared picture Jared · Jan 17, 2011 · Viewed 9.6k times · Source

Is there a way to get python to read modules from a network?

We have many machines and it would be a too much effort to update each machine manually each time I change a module so I want python to get the modules from a location on the network.

Any ideas?

Answer

Senthil Kumaran picture Senthil Kumaran · Jan 17, 2011

Mount your network location into your file-system and add that path to your PYTHONPATH. That way, Python on your local machine will be able to see the modules which are present in the remote location. You cannot directly import from modules remotely, like specifying a js file in html.