By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,732 Members | 1,397 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,732 IT Pros & Developers. It's quick & easy.

plotting and diagramming library

P: n/a
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
pr*****@netzero.net
Jul 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Erik Lechak wrote:
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
Jul 18 '05 #2

P: n/a
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.

Fernando Perez <fp*******@yahoo.com> wrote in message news:<bn**********@peabody.colorado.edu>...
Erik Lechak wrote:
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

Jul 18 '05 #3

P: n/a
pr*****@netzero.net (Erik Lechak) wrote in message news:<1f**************************@posting.google. com>...
The current library/test application is here (need python2.3 and
wxPython):
http://home.bellsouth.net/p/PWP-dande


Thank you so much for doing it. I think this thread deserves more
attention from other people. It's a very important tool set.

Hung Jung
Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.