[Numpy-discussion] drawing with NumPy and PythonCard - SciPy test

Kevin Altis altis at semi-retired.com
Wed Oct 10 11:11:11 EDT 2001

A suggestion was made that I should check out SciPy. I downloaded and
verified that the plt module works fine from within a PythonCard app using
the built-in PythonCard shell. My test was the plt tutorial at

I've emailed some of the SciPy developers, but there seems to be some mail
gateway issues (the mail bounced) on their server right now, so I haven't
heard back from anyone yet.

Given that plt works with PythonCard today, people might be interested in
being able to create dynamic buttons, fields, and methods from the
interactive prompt using SciPy with PythonCard. The follwoing message shows
dynamic method binding.


Adding other widgets such as a field is just as easy as adding a button, it
is the same syntax as used in the resource files, so the following is valid:

>>> comp['field2'] = {'type':'TextField', 'name':'field2', 'position':(0,
30), 'size':(150, -1), 'text':'this is field2'}

For people that want to mostly do interactive sessions, but still be able to
use buttons and fields to speed up data entry... this will probably be
useful in the context of something like SciPy. Let me know if there are
other questions or suggestions.


> -----Original Message-----
> From: numpy-discussion-admin at lists.sourceforge.net
> [mailto:numpy-discussion-admin at lists.sourceforge.net]On Behalf Of Kevin
> Altis
> Sent: Monday, October 08, 2001 10:40 AM
> To: numpy-discussion at lists.sourceforge.net
> Subject: [Numpy-discussion] drawing with NumPy and PythonCard
> Hi,
> I'm the coordinator for the PythonCard project, which is at:
> http://pythoncard.sourceforge.net/
> PythonCard provides a GUI framework for building Python applications. The
> project is relatively new, but there are a large number of sample
> applications, including a number of drawing and visualization samples.
> PythonCard already supports loading and drawing of common formats
> like XBM,
> GIF, JPEG, PNG, etc. from disk files.
> Last month I started a BitmapCanvas for the framework to simplify
> interactive drawing. Rather than duplicate all of the functionality of the
> Python Imaging Library (PIL) or the various plotting packages already
> available, I want to make it easy to display results created with other
> drawing packages and numPy in PythonCard. To that end, the Bitmap and
> BitmapCanvas class already support PIL. You can convert a PIL RGB image
> to/from a PythonCard bitmap and you can draw a PIL RGB image in a
> BitmapCanvas at a given x, y location. If you're already converting from
> numPy to PIL, you should be able to show your results in
> PythonCard today. I
> will be making a related post about this on the image-sig.
> Anyway, what I would like to do is provide similar methods to make it easy
> to convert numPy arrays to images or a bitmap to numPy without
> having to go
> to PIL first. I don't currently use numPy since I don't do any scientific
> computing (and my math skills are pretty pathetic) and most of my programs
> are text or database-oriented, so I'm relying on others to spec out the
> features they need or want. Eventually, I would like to add some visual
> effects to PythonCard such as wipes and fades which would be a perfect use
> of arrays. I want to make sure that PythonCard provides a good
> GUI framework
> for the scientific community. I would appreciate any suggestions, pointers
> to related resources, etc.
> PythonCard currently sits on top of wxPython, so if you are
> already working
> with numPy and wxPython I would be very interested to hear about
> it. If you
> would like to get more actively involved, please join the
> PythonCard mailing
> list, which is probably a better place for longer-term
> discussions than the
> numPy list.
> http://lists.sourceforge.net/lists/listinfo/pythoncard-users
> Thanks,
> ka
> ---
> Kevin Altis
> altis at semi-retired.com
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion

More information about the NumPy-Discussion mailing list