[Python-Dev] Importing packages from command line (original) (raw)
Dmitry Vasiliev lists at hlabs.spb.ru
Tue Dec 23 06:09:27 EST 2003
- Previous message: [Python-Dev] Importing packages from command line
- Next message: [Python-Dev] Importing packages from command line
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Alex Martelli wrote:
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 packagename" for this purpose even today?
python -c "import sys; sys.path.insert(0, 'module.zip'); import module"
Seems ugly... :)
-- Dmitry Vasiliev (dima at hlabs.spb.ru)
- Previous message: [Python-Dev] Importing packages from command line
- Next message: [Python-Dev] Importing packages from command line
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]