WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Tk with Vizard (https://forum.worldviz.com/showthread.php?t=32)

farshizzo 06-23-2003 10:27 AM

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

sled 06-23-2003 12:08 PM

Thank you for your help , but it still can not work,the message as following.
Traceback (most recent call last):
File "", 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.

sled 06-23-2003 12:16 PM

1 Attachment(s)
my file is attached, it works properly in pythonwin, but when I invoke some viz method , it 's dead.

farshizzo 06-23-2003 12:34 PM

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

farshizzo 06-23-2003 12:38 PM

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

sled 06-23-2003 04:13 PM

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 "", 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'

farshizzo 06-23-2003 04:21 PM

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

sled 06-23-2003 07:14 PM

oh, it works well, thanks a lot.

softscan 02-04-2004 08:32 PM

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

farshizzo 02-05-2004 09:41 AM

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?

jrodman 09-10-2004 01:02 PM

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.

farshizzo 09-10-2004 01:40 PM

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.

jrodman 09-15-2004 11:16 AM

I tried the new tkinter.zip file. It still gives the same error.

Any other ideas?

farshizzo 09-15-2004 11:25 AM

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

jrodman 07-11-2007 01:45 PM

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?

farshizzo 07-11-2007 01:48 PM

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.


All times are GMT -7. The time now is 04:48 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC