Suggestions for automatic import

David Harrison daha at speakeasy.net
Mon Mar 17 15:29:26 EST 2003


The system I am working on is based on interpreting a Python  control
script.  We do the standard thing of calling the PyRun_SimpleFile()
function from our main application.  We have extension modules for
the specific functionality of our system.

I recently got some usability feedback that the users would like
to be able to call our functions without saying "import whatever"
at the top of the script.  I know this is not strictly pythonic but
it is a user request.  What is the best way to automatically import
a few modules before we interpret the main control script?

         David S. Harrison
         (daha at speakeasy.net)




More information about the Python-list mailing list