You need the:
int main(int argc, char * argv[])
{
Py_Initialize();
PySys_SetArgv(argc, argv);
PyRun_SimpleString("execfile(r'1.py')");
Py_Finalize();
return 0;
}
Regards,
Antonio
On Sunday 24 May 2009 11:42:13 孟炜 wrote:
> I have the following codes in C++:
> #include
> void
I have the following codes in C++:
#include
void main(){
Py_Initialize();
PyRun_SimpleString("execfile(r'1.py')");
Py_Finalize();
return;
}
the following is in 1.py :
import Tkinter
root=Tkinter.Tk()
root2=Tkinter.Tk()
root.mainloop()
root2.mainloop()
this is the output after I ru