Re: Calling python function from C and import questions

2007-01-26 Thread Gabriel Genellina
<[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > Is there a better way to make a call from C than > > PyRun_SimpleString("import > foo_in_python\nfoo_in_python.bar(whatever)\n"); > > I already imported the foo_in_python using PyImport_ImportModule > and wonder why do I need to

Calling python function from C and import questions

2007-01-26 Thread sndive
Is there a better way to make a call from C than PyRun_SimpleString("import foo_in_python\nfoo_in_python.bar(whatever)\n"); ? I already imported the foo_in_python using PyImport_ImportModule and wonder why do I need to keep importing it every time I'm calling a python function in that module. I