Initializing a python module with parameters

Iggeres Bet iggeres at yahoo.es
Wed Dec 4 11:11:14 EST 2002


Hello,

I am writing a Python module using the C API, but I need to call the
module
init...() with custom parameters to initialize it on different
environments.

The perfect solution would be a:

   # Calling a module constructor
   import mymodule(<parameters>)

I can write:
   import mymodule
   mymodule.init(<parameters>)

But I don't see this code explicit and elegant. What is the best way
to pass initialization parameters to a Python module?


Thank You
Iggeres



More information about the Python-list mailing list