#1
|
|||
|
|||
Tk with Vizard
This thread explains how to use Tk with Vizard
Step 1: Download the following file to your computer: tkinter.zip Step 2: Open the file with Winzip or a similar program. Extract the contents of the zip file to [VIZARD_PATH]\bin\ where [VIZARD_PATH] is the location of your Vizard installation (usually C:\Program Files\Vizard). That's it, Tk should now work with Vizard. If you have any problems please post them here. -- Farshid |
#2
|
|||
|
|||
Thank you for your help , but it still can not work,the message as following.
Traceback (most recent call last): File "<string>", line 1, in ? File "C:\Documents and Settings\Administrator\Desktop\gv10.weigang\weigan gGUI. py", line 2, in ? from tkFileDialog import * File "C:\Program Files\Vizard\bin\lib\tkFileDialog.py", line 39, in ? from tkCommonDialog import Dialog File "C:\Program Files\Vizard\bin\lib\tkCommonDialog.py", line 15, in ? from Tkinter import * File "C:\Program Files\Vizard\bin\lib\Tkinter.py", line 35, in ? import _tkinter # If this fails your Python may not be configured for Tk ImportError: DLL load failed: The specified module could not be found. |
#3
|
|||
|
|||
my file is attached, it works properly in pythonwin, but when I invoke some viz method , it 's dead.
|
#4
|
|||
|
|||
Hi,
I tested out your script and it worked fine on my machine. Did you try restarting Vizard after you copied the tkinter files to your computer? -- Farshid |
#5
|
|||
|
|||
Hi again,
I just realized that I made a mistake. There are two files that are copied to the [VIZARD_PATH]\bin\lib directory that should go to the [VIZARD_PATH]\bin\DLLs directory instead. The two files are: tk83.dll tcl83.dll Just take those files out of the lib directory and put them in the DLLs directory, then restart Vizard. Sorry about that. -- Farshid |
#6
|
|||
|
|||
thanks a lot and sorry to bother you again, the tk gui works well in vizard now , but when I begin to invoke the viz.add(...) by click the start button,it shows err message:
Traceback (most recent call last): File "<string>", line 1, in ? File "weigangGUI.py", line 58, in ? root = Tk() File "C:\Program Files\Vizard\bin\lib\Tkinter.py", line 1483, in __init__ baseName = os.path.basename(sys.argv[0]) AttributeError: 'module' object has no attribute 'argv' |
#7
|
|||
|
|||
Hi,
This is a problem we've encountered before and has already been resolved in the latest version. At the top of your script you need to issue the following commands: import sys sys.argv = [''] (Note: those are two single quotes) That should do it, but please let me know if it doesn't work. -- Farshid |
#8
|
|||
|
|||
oh, it works well, thanks a lot.
|
#9
|
|||
|
|||
I have just installed ActiveStates PythonWin IDE whic goes into C:/Python2.3 by deault.Will this work OK with VIzard or do I need to set paths. If so what?
HOpe this is OK in thi thread. Thanks Johnny K |
#10
|
|||
|
|||
Hi,
You will need to add the following directories to your python path in order to get Vizard working: [Vizard20]/ [Vizard20]/python/ That should be it. Are you planning on using Tk? |
#11
|
|||
|
|||
tkinter stopped working
I had tk working with Vizard, and at some point in the last few months it stopped working. I tried everything suggested in this thread.
It gives the following error message: File "C:\Program Files\Vizard20\bin\lib\Tkinter.py", line 35, in ? import _tkinter # If this fails your Python may not be configured for Tk ImportError: DLL load failed: The specified module could not be found. |
#12
|
|||
|
|||
Hi,
Try downloading and reinstalling the tkinter.zip file. Vizard recently switched from python 2.2 to 2.3, and the tkinter files were not updated. Let me know if this fixes it. |
#13
|
|||
|
|||
I tried the new tkinter.zip file. It still gives the same error.
Any other ideas? |
#14
|
|||
|
|||
Hi,
You need to uninstall the previous version of Tk first. Delete the following files from the C:\Program Files\Vizard20\bin\lib directory: Canvas.py Dialog.py FileDialog.py FixTk.py ScrolledText.py SimpleDialog.py Tix.py tkColorChooser.py tkCommonDialog.py Tkconstants.py Tkdnd.py tkFileDialog.py tkFont.py Tkinter.py tkMessageBox.py tkSimpleDialog.py turtle.py Also, delete the following directories: C:\Program Files\Vizard20\bin\lib\tcl8.3 C:\Program Files\Vizard20\bin\lib\tk8.3 |
#15
|
|||
|
|||
tkinter is not working for me with Vizard 3.0.
I'm getting the same error message as before: from Tkinter import * File "C:\Program Files\WorldViz\Vizard30\bin\lib\lib-tk\Tkinter.py", line 38, in ? import _tkinter # If this fails your Python may not be configured for Tk ImportError: No module named _tkinter It looks like Vizard upgraded from Python 2.3 to 2.4. Does that mean we need new tkinter files? |
#16
|
|||
|
|||
Hi,
Have a look at the Vizard downloads page. Under the "Vizard 3.0 Addons" section there is an installer that adds the necessary Tkinter files to your Vizard 3.0 installation. |
|
|