execfile(), import and namespaces
Gordon McMillan
gmcm at hypernet.com
Fri Jul 2 16:22:44 EDT 1999
More information about the Python-list mailing list
Fri Jul 2 16:22:44 EDT 1999
- Previous message (by thread): execfile(), import and namespaces
- Next message (by thread): embedding; return array
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Nikolas Kauer wrote: > We use a modification of "Listing One" of Andrew Kuchling's "A CGI > Framework in Python" article in Web Techniques (February 1998) for > our dynamic Web site. [...] The object files would be loaded as > modules with 'import'. > > Problem: In the following code snipet environment variables are > passed to the executed Python file via the corresponding global > namespace argument of the execfile() function; whereas the 'import' > statement does not allow for such arguments. But __import__ does. Check the library docs under built-in-functions. - Gordon
- Previous message (by thread): execfile(), import and namespaces
- Next message (by thread): embedding; return array
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list