Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Need Suggestions for Python/Tk/VTK

Reply
Thread Tools

Need Suggestions for Python/Tk/VTK

 
 
Yang Wang
Guest
Posts: n/a
 
      05-03-2004
Dear All,

I am totally new to Python, however had some experience with Tcl/Tk.
Currently I am doing a project that will need Python/Tk as well
as VTK(Visualization Toolkit) for image processing and visualization.

Have anyone had any experience in this that can give me some suggestions
or references? And I also wonder how Tk is working with Python in
the process of constructing GUI, is it like the way that with Tcl?

Any help will be greatly appreicated. Thanks.

Yours,
Casper


 
Reply With Quote
 
 
 
 
Eric Brunel
Guest
Posts: n/a
 
      05-03-2004
Yang Wang wrote:
> Dear All,
>
> I am totally new to Python, however had some experience with Tcl/Tk.
> Currently I am doing a project that will need Python/Tk as well
> as VTK(Visualization Toolkit) for image processing and visualization.
>
> Have anyone had any experience in this that can give me some suggestions
> or references? And I also wonder how Tk is working with Python in
> the process of constructing GUI, is it like the way that with Tcl?
>
> Any help will be greatly appreicated. Thanks.
>
> Yours,
> Casper


I never used VTK, so I cannot help you for this part. As for the GUI
construction process in Python/Tkinter, the only difference with tcl/tk is the
syntax. For example, instead of doing in tcl:

frame .frm -width 500 -height 200 -bd 3 -fg red
pack .frame -side top

in Python, you'll do:

## Import the Tkinter module
from Tkinter import *
## Initialize Tkinter/tk
root = Tk()
## The next two lines are the equivalent of the two tcl lines above
frm = Frame(root, width=500, height=200, bd=3, fg='red')
frm.pack(side=TOP)

So you see, it's quite straightforward. The concepts, widgets, operations,
options, ... are exactly identical in Python/Tkinter and tcl/tk. In fact, the
Tkinter module actually creates a tcl interpreter in the background and converts
all calls to Tkinter objects to tcl commands. So once you've understood how to
convert tcl syntax to Python/Tkinter syntax, you can even use the tcl/tk manual
pages as a reference.

HTH
--
- Eric Brunel <eric (underscore) brunel (at) despammed (dot) com> -
PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com

 
Reply With Quote
 
 
 
 
David M. Cooke
Guest
Posts: n/a
 
      05-03-2004
At some point, Yang Wang <> wrote:

> Dear All,
>
> I am totally new to Python, however had some experience with Tcl/Tk.
> Currently I am doing a project that will need Python/Tk as well
> as VTK(Visualization Toolkit) for image processing and visualization.
>
> Have anyone had any experience in this that can give me some suggestions
> or references? And I also wonder how Tk is working with Python in
> the process of constructing GUI, is it like the way that with Tcl?
>
> Any help will be greatly appreicated. Thanks.


Have a look at the MayaVi project, which uses Tkinter and VTK for data
visualization. You should be able to get some ideas from that.

http://mayavi.sf.net/

--
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Req: Need suggestions for search algorithm Ben Fidge ASP .Net 8 05-02-2005 07:56 PM
Need suggestions: Best Rich Text Editor for ASP.NET VB Programmer ASP .Net 2 12-29-2004 01:45 AM
Need suggestions for laying out dynamic content on page... Jack Black ASP .Net 0 09-27-2004 11:34 PM
Need suggestions for network switch Tod DeBie Cisco 2 02-15-2004 09:11 AM
Help esk Suggestions - Best Practices, Tool, ideas, suggestions, etc JohnNews Computer Support 3 06-23-2003 11:20 PM



Advertisments