[Python-Dev] Importing packages from command line (original) (raw)

Alex Martelli aleaxit at yahoo.com
Mon Dec 22 12:07:14 EST 2003


On Monday 22 December 2003 12:45 pm, Dmitry Vasiliev wrote: ...

>>1. python -p packagename >> >> Equivalent to: >> >> import packagename ... The main idea is to treating package as a program and run package initialization code from command line. The advantage is zipping all program modules in one zip archive and running the program from command line without unzipping it, like Java's jar's. But this idea need more thoughts however...

Couldn't you use: python -c "import package_name" for this purpose even today?

Alex



More information about the Python-Dev mailing list