GUI issues in Python

D

diffuser78

Hi,

I want to create a GUI where a user can select drag and drop kind of
boxes, circles and make connections between them.

This is basically for depicting states and dependencies. I am writing a
program where I let the user input states and dependencies in a certain
domain. Based on input given by user in the GUI, I grab it and run my
algorithm to generate the output.

I am wondering if there is any library like that in Python, or if
anybody of you has done something similar in past, could you post some
pointers.

thanks
 
D

Diez B. Roggisch

Hi,

I want to create a GUI where a user can select drag and drop kind of
boxes, circles and make connections between them.

This is basically for depicting states and dependencies. I am writing a
program where I let the user input states and dependencies in a certain
domain. Based on input given by user in the GUI, I grab it and run my
algorithm to generate the output.

I am wondering if there is any library like that in Python, or if
anybody of you has done something similar in past, could you post some
pointers.

tkinter. Amongst a bazillion others - but this is included, and the
canvas-widget actually very useful for your purpose.

Regards,
 
D

diffuser78

My question basically revolves around... that I dont want to draw
circles and boxes for drawing purposes.

I want the end user to be able to draw the GUI boxes and circles and
makes connection to depict states and dependencies. So its a little
unconventional and more like a SIMULATION TOOL.

I am pretty sure Python must have something like this. Any idea how to
go about it.
 
D

Daniel Dittmar

I want to create a GUI where a user can select drag and drop kind of
boxes, circles and make connections between them.

This is basically for depicting states and dependencies. I am writing a
program where I let the user input states and dependencies in a certain
domain. Based on input given by user in the GUI, I grab it and run my
algorithm to generate the output.

I am wondering if there is any library like that in Python, or if
anybody of you has done something similar in past, could you post some
pointers.

wxPython has an interface to the OGL library (screenshot:
http://www.wxpython.org/ss/wxPythonOSX.png, features:
http://www.wxwindows.org/contrib/ogl/ogl.htm)

Daniel
 
D

diffuser78

Thanks Daniel, I really think that this should be the solution to my
problem.

A quick Question...is wxPython Operating System dependent or it can be
used with anu OS like Linux, Windows and Mac ?
 
D

Daniel Dittmar

Thanks Daniel, I really think that this should be the solution to my
problem.

A quick Question...is wxPython Operating System dependent or it can be
used with anu OS like Linux, Windows and Mac ?

see http://www.wxpython.org/download.php#binaries

Linux and Win32 have been supported for a while. And the screenshot in
my first reply was from Mac OS X, so OGL seems to be supported there too.

The wxPython demo application has an OGL example, so you can check that
pretty quickly.

Daniel
 
T

Thomas Jollans

My question basically revolves around... that I dont want to draw
circles and boxes for drawing purposes.

I want the end user to be able to draw the GUI boxes and circles and
makes connection to depict states and dependencies. So its a little
unconventional and more like a SIMULATION TOOL.

I am pretty sure Python must have something like this. Any idea how to
go about it.

a tkinter canvas can be hooked up via events with your simulation
algorithm easily.

So, user clicks some point -> the program/simulation gets the coordinates
and action -> does something -> draws something -> ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,190
Latest member
ClayE7480

Latest Threads

Top