[Python-Dev] Importing packages from command line (original) (raw)
Dmitry Vasiliev lists at hlabs.spb.ru
Mon Dec 22 06:45:14 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 ]
Michael Chermside wrote:
Just an idea...
1. python -p packagename Equivalent to: import packagename (1) Sourceforge is a great place to request feature enhancements. Suggestions made on this mailing list is likely to be forgotten sooner or later.
Yes, I know, but the request is not formed yet. :-)
(2) Can you explain WHY you would want this feature? Is there some use case? I would prefer NOT to have this, because right now if I'm reading code and it uses "packagename.someFunction()" I can scan upward for "packagename" to find out what it's using. With command line imports, I couldn't do that. So unless you've got a good reason for it, I personally wouldn't want this feature.
Sorry for description absentees.
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...
-- 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 ]