How do I create a custom python interpreter? i.e. with certain modules already included?

Posted by Johnny Brown on Stack Overflow See other posts from Stack Overflow or by Johnny Brown
Published on 2011-01-03T00:36:05Z Indexed on 2011/01/03 1:53 UTC
Read the original article Hit count: 507

Filed under:

If you've used Ruby on Rails, I'm thinking of the feature where the user types

'rails console'

and instantly gets a Ruby console with rails and the current app already loaded.
I want to make something like this for a python program I'm working on, does anyone know how I would get to type say,

'python myPythonConsole.py'

and open up a regular python interpreter but with my program and all its dependencies loaded?

© Stack Overflow or respective owner

Related posts about python