SM> if __name__ == '__main__': SM> import db_test SM> new_globals = {} SM> new_globals [ '__name__' ] = '__main__' SM> new_globals [ '__file__' ] = 'not really valuable' SM> execfile ( 'db_test.py', new_globals )Why not: import db_test db_test.main() I think that is what Aahz meant.
Yes I tried that too, but it gives the following error: "module object not callable" db_text.__main__() gives error: 'module' object has no attribute '__main__' cheers, Stef -- http://mail.python.org/mailman/listinfo/python-list
