how to run the "main" section of another module ?

Aahz aahz at pythoncraft.com
Sun Jul 12 14:44:10 EDT 2009


In article <mailman.3032.1247422431.8015.python-list at python.org>,
Stef Mientki  <stef.mientki at gmail.com> wrote:
>Stef deleted an attribution:
>>
>> Why not:
>>
>> import db_test
>> db_test.main()
>   
>Yes I tried that too, but it gives the following error: "module object
>not callable"

You need to create a main() function in db_test first.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"If you think it's expensive to hire a professional to do the job, wait
until you hire an amateur."  --Red Adair



More information about the Python-list mailing list