*Newbie Question* --> Is it viable to distribute Python apps over the Internet?

Gerhard Häring gh at ghaering.de
Thu Apr 24 20:45:07 EDT 2003


Dennis Reinhardt wrote:
>>sys.path = [".", ".\\bin", ".\\bin\\libstd", ".\\bin\\libxtra"]
>>Maintaining this "manual hack" is far less effort than you would guess.
> 
> 
> There is something I forgot to mention.  Suppose you start with a decent
> size app already?  You do not have to go through and add files to this
> structure 1-by-1.
> 
> To seed this structure initially, comment out the sys.path line so that you
> are using your system python path.  Now, delete *.pyc where the *.py exists.
> Run your program and exercise its functions.  Exit.  Now, where *.pyc files
> exist in the system python path, you need to copy the .py files to a
> subdirectory listed in sys.path.
> 
> In one step, you have now populated your subdirectories with the required
> libraries.  There may be other files that you will end up needing and
> restoring the sys.path statement will quickly find them.

Poor man's modulefinder, eh? Neat :-)

-- Gerhard





More information about the Python-list mailing list