<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=text/html;charset=gb2312 http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18702"></HEAD>
<BODY style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px" 
id=MailContainerBody leftMargin=0 topMargin=0 CanvasTabStop="true" 
name="Compose message area">
<DIV><FONT face=Calibri><FONT face=ËÎÌå>I have the following codes in C++: 
<BR>#include <Python.h> <BR>void main(){ <BR>Py_Initialize(); 
<BR>PyRun_SimpleString("execfile(r'1.py')"); <BR>Py_Finalize(); <BR>return; 
<BR>} <BR><BR>the following is in 1.py  : <BR>import Tkinter 
<BR>root=Tkinter.Tk() <BR>root2=Tkinter.Tk() <BR>root.mainloop() 
<BR>root2.mainloop() <BR><BR>this is the output after I run the c++ 
program: <BR>Traceback (most recent call last): <BR>  File " 
<string>", line 1, in <module> <BR>  File "g:\volatile\1.py", 
line 2, in <module> <BR>    root=Tkinter.Tk() <BR>  File 
"C:\Python26\lib\lib-tk\Tkinter.py", line 1638, i <BR>    baseName = 
os.path.basename(sys.argv[0]) <BR>AttributeError: 'module' object has no 
attribute 'argv' </FONT></FONT></DIV>
<DIV><FONT face=Calibri><FONT face=ËÎÌå></FONT></FONT> </DIV>
<DIV><FONT face=Calibri><FONT face=ËÎÌå>I am quite new to python ,anyone know what 
shoud i do to solve it?</FONT></FONT></DIV>
<DIV><FONT face=Calibri><FONT face=ËÎÌå>Thanks a lot!</FONT></DIV>
<DIV><BR></DIV></FONT></BODY></HTML>