Author johnnoone
Recipients
Date 2003-03-06.23:15:08
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Using Python 2.2.2 on MS Windows 2000 platform. 
Calling embedded Python from Visual C++ works fine 
until I add a call to Tkinter (version 8.3). Follow the 
example in section 5.3 at the following link:
http://www.python.org/doc/ext/extending-with-
embedding.html
Link call.cpp as is and add a line to multiply.py to 
create a Tkinter frame:
"fr = Tkinter.Tk()"   // added import for Tkinter too!
Yields the following error messages:

C:\Python22\c\vcpp\hello3>hello3 call multiply 2 3
Thy shall add 2 times 3
Traceback (most recent call last):
  File "C:\Python22\c\vcpp\hello3\call.py", line 7, in 
multiply
    fr = Tk()
  File "C:\Python22\lib\lib-tk\Tkinter.py", line 1491, in 
__init__
    baseName = os.path.basename(sys.argv[0])
AttributeError: 'module' object has no attribute 'argv'
Call failed

Is there a problem using Tkinter from C++? Python/Tk 
work fine standalone.



History
Date User Action Args
2007-08-23 14:11:43adminlinkissue699068 messages
2007-08-23 14:11:43admincreate