Include File?

Peter Otten __peter__ at web.de
Fri Oct 3 08:16:52 EDT 2003


Whofer wrote:

> i am a totally python newcomer. Can i use
> include files within python?
> 
> (like for example:  include <xxx.py>)


The python equivalent is

import xxx

#use it, assuming the doSomething() function is defined in module xxx:
xxx.doSomething()

If you already know a programming language, the tutorial that comes with the
python distribution is a good starting point to learn the language.
Good luck!

Peter




More information about the Python-list mailing list