Re: Visual Python, OS X source build, Homebrew dependencies

Guilherme Brondani Torri <[email protected]> Wed, 15 Aug 2012 12:02:29 +0200
Newsgroups gmane.comp.python.visualpython.user
Message-ID <[email protected]>
On 14/08/12 00:19, Bruce Sherwood wrote:
> What remains is a fair amount of work to replace the current GUI
> machinery with this scheme, which has the added advantage of being
> based on wxPython which will provide such features as pull-down menus,
> etc.

In case deep changes are needed, perhaps it is worth investigation how 
other projects handle the GUI part.
For instance, Matplotlib[1] and Chaco[2] can handle several backends 
(WX, Qt, GTK, Tk, Cocoa/Mac OSX, ...). Backends can be changed at will 
(provided dependencies are available during install). The default is 
decided during installation or via a variable stated on a 
configuration/profile file. Therefore a 'import visual' will know how to 
handle itself on the target system, hopefully without breaking existing 
code. One can also switch backends by importing the desired backend 
module or via a 'select' method on the beginning of the program.
The backend encapsulates the user interaction and the rendering, letting 
the lower level modules be as generic as possible (in terms of GUI 
management). This would allow easy embedding whenever a backend is 
available.
Users should be able to follow templates and create new backends as they 
do for Matplotlib [3],[4].

I must say that I'm not yet familiar with the VPython code. I also don't 
know how it all fit together with the conflict between VPython and 
Cocoa, but the suggestion remains.

Best,
Guilherme

[1] http://matplotlib.sourceforge.net/faq/installing_faq.html#backends
[2] 
http://code.enthought.com/projects/chaco/docs/html/architecture_overview.html
[3] 
https://github.com/matplotlib/matplotlib/tree/master/lib/matplotlib/backends
[4] https://github.com/matplotlib/matplotlib/tree/master/src


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/