Message15001
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.
|
|
| Date |
User |
Action |
Args |
| 2007-08-23 14:11:43 | admin | link | issue699068 messages |
| 2007-08-23 14:11:43 | admin | create | |
|