1

As a python noob, this might be an obvious question but just wondering if there's a way to package multiple python modules as one file and then copy it from server to server.

Basically, I wrote a script to be run on our servers. Because it started getting large, someone asked me to break tasks out to different files, kind of like different java class files. I have a main.py, download.py, process.py, etc. In the main.py, at the top, I have all my import statements.

import main
import download
import blah
import etc

Now that I need to copy this script to multiple servers, I want to know if there's an easy way to package all these files into one package/module so I only have to copy one file, rather than multiple py files to each server. Also, when making updates/changes, it will make things easier to manage too.

I ran into PyPI from Head First Python but I don't think we want to publish this script for all to see. A non-Internet sharing way to package the files is appreciated =)

Classified
  • 5,759
  • 18
  • 68
  • 99

0 Answers0