splitting common functions into a sepperate module

jonkersbart at gmail.com jonkersbart at gmail.com
Thu Mar 8 09:45:24 CET 2007


Dear,

I have wrote a script and want to group some functions of the script
in a separate modulo so that I can import the module in other scripts
and use the same functions there..

The problem is that the common functions need access to some global
variables defined in the script. Python uses different namespaces for
different modules so I can't access the variables of the script in the
module.

What is the best solution to solve this problem?

Thanks in advance,
Bart




More information about the Python-list mailing list