WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rating: Thread Rating: 8 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-04-2003, 10:34 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
wxPython with Vizard

This thread explains how to install wxPython on your computer and getting it to work with Vizard.

Step 1:

Install Vizard on your computer

Step 2:

Download the script RegisterVizardWithPython.py. Open it with Vizard and run it. It should print out "--- Python 2.3 is now registered!" when successfully finished.

Step 3:

Go to http://www.wxpython.org
Under the download section click on Binaries
Under Win32 click on the link to download wxPython for Python 2.3. There will be an ansi version and a Unicode version, download the ansi version. Follow the link and download the file to your computer.

There will also be a link to download the documentation and demos called "win32-docs-demos". Download this also.

Step 4:

Once the files are downloaded, run the main installer. The installer should automatically detect where Vizard is installed and select it as the install directory. When the main installer has finished, run the installer for the documentation and demos.

Step 5:

To test out whether wxPython works, click on the Start menu -> Programs -> wxPython2.6 Docs Demos and Tools -> Sample Apps.
Open the doodle folder then open superdoodle.py in Vizard. If you are able to make doodles, then you successfully installed wxPython.

!!!!!!IMPORTANT - READ THIS!!!!!!!
Running wxPython scripts multiple times in the Vizard GUI may cause crashes. This is because most of the wxPython scripts do not clean up after themselves. Most wxPython scripts have the following code at the end which basically runs the main application:
Code:
if __name__ == '__main__':
    app = SomeApp()
    app.MainLoop()
To force wxPython to cleanup, add the following line after the mainloop:
Code:
del app
This will delete the application from memory and hopefully prevent crashes from occuring next time you run the script.
Reply With Quote
 

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:02 AM.


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