newbie - How do I import automatically?

bobueland at bobueland at
Tue Nov 15 21:08:49 CET 2005

When I start Python Shell I can see that some names or loaded
automatically, ready for me to use

>>> dir()
['__builtins__', '__doc__', '__name__']

I have written some functions in a file called I would like
to import them automatically when I start up Python shell. Today I must
do it by hand like this

>>> from btools import *
>>> dir()
['__builtins__', '__doc__', '__name__', 'func1', 'func2', 'func3']

Is there a way to do this automatically so that I always have 'func1',
'func2' and so on available, without me having to do it by hand?


More information about the Python-list mailing list