plotting and diagramming library

E

Erik Lechak

Hello All,

I am creating a visual programming environment for python (similar to
Matlab's simulink, but for python). For several reasons I have
decided not to go with OGL. I am writing a wxOGL replacement library
for wxPython.

My first thought was to create an exact drop in replacement for OGL,
but the more I look at the OGL api the more I hesitate to do it.

The current library/test application is here (need python2.3 and
wxPython):
http://home.bellsouth.net/p/PWP-dande

Please try it out and look at the code. You can connect pieces, zoom,
tab to different shapes, add shapes to container blocks, and add code
to code blocks.

Eventually I would like this library to be used for complex diagrams
as well as plotting. This means the library will have primitive
shapes (no resize, no selection ...). It will also have complex
shapes (resize, intelligent connections, selections). OGL does not
really have this distinction.

While working on this library I also noticed that it would be possible
to make this library work with pygame.

Here are my questions:
1) Should I model my api on OGL or the Tk::Canvas (I think it's
Canvas).

2) Should I make it an exclusively wxPython library or should I put
the time in now to make it work with wxPython and the pygame library?
Are there other graphics libraries it should work with?

3) Would there be any interest if it could load and save in SVG
format?

4) Should I go the OGL route and make the base class "Shape" fairly
heavyweight like OGL, or should I make it lightweight (like I want).
Lightweight means that the primitive shapes will hold their x,y data
and know how to draw themselves and that's about it. Lightweight
shapes would be great for plotting. On the other hand there has to be
a reason why OGL and Tk give their basic shapes so much functionality.

5) wxDiagram is basically a list. I want my "Diagram" to take
advantage of that fact and either have it inherit from list or
delegate list-methods to its main list member. After all, this is
python, and it would be cool to be able to
insert,pop,append,extend,...,and iterate over a wxDiagram. My problem
is wxPython/wxOGL api already has some naming conventions that don't
look like the python list functions. Which one of these choices do
you like
a) Only implement the python list functions (or inherit from list,
decorate when necessary)
b) Only implement the wxDiagram api. (python list functionality
lost)
c) Implement both. (this kind of violates python's "one way to do
it")


Any one out there using (or wants to use) python for plotting or
diagramming? I would like to hear from you.

Thanks,
Erik Lechak
(e-mail address removed)
 
F

Fernando Perez

Erik said:
Hello All,

I am creating a visual programming environment for python (similar to
Matlab's simulink, but for python). For several reasons I have

You might want to look at Viper
http://www.scripps.edu/~sanner/python/index.html

It's an extremely impressive, full-blown graphical programming environment for
python. It offers 'visual' programming, but all objects are always editable
as pure code, so it doesn't seem to hinder 'real' programming as many visual
environments seem to do.

Cheers,

f
 
S

Samir Patel

I downloaded OGLlike.py and its concept is what I have in my mind too.
I was also looking at other framework wxArt2d (no Python interface
yet). It does a lot of things which you like to do. May be working on
python interface to this is a good start too.
 

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

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top