Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
370 views
in Technique[技术] by (71.8m points)

python - Importing module from network

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...