Tuesday, October 19, 2004


PythonCard 0.8.1

PythonCard is a GUI construction kit for building cross-platform desktop applications on Windows, Mac OS X, and Linux. The latest release of PythonCard includes over 50 sample applications and tools to help users edit and build applications in Python, plus many useful programs like the slideshow sample that you might want to use without ever bothering to do any coding. Check out the sample pages for screenshots and info about the samples. The more applications page has some info and screenshots on applications users have built with PythonCard.

New samples include floatCanvasTest, flock, gravity, testNotebook, and testSplitter. There is a new version of the codeEditor that uses tabs and will eventually replace the existing codeEditor. There is also an experimental reStructuredText and HTML editor in the codeEditor directory called restEditor.

PythonCard requires Python 2.3 or higher and wxPython 2.5.2.8 or higher.

The documentation page has links to installation instructions for Linux, Mac OS X, and Windows that covers installing Python, wxPython, and PythonCard. The Linux instructions will be updated soon, but we're waiting for the RPMs to be built, so for now Linux users can just download and install from the tar.gz source archive. The documentation includes some walkthroughs, screenshots and info on using PythonCard and some of its tools such as the codeEditor, resourceEditor (layout tool), findfiles, and runtime shell.

There are many changes from the earlier PythonCardPrototype packages. See the migration_guide.txt file if you are upgrading from an earlier release. Check the changelog for a complete list of changes for release 0.8.1.

If you would like to contribute to PythonCard, the first step is joining the mailing list.


2:17:09 PM    comment []

  Friday, October 01, 2004


PythonCard to the Rescue - a success story involving accelerometers, a microcontroller, Python, and PythonCard with screenshots and source code. I can't say I understand all the "hardware" talk since I am but a lowly software guy, but I was quite happy to read Daryl Fox's story as it shows that PythonCard is simple and easy to use and can get the job done even if you don't program graphical user interfaces (GUIs) every day. And in case you're curious, Daryl was a 2002 Flugtag Champion.


9:55:04 AM    comment []

  Thursday, September 30, 2004


PythonCard Coding Sprint

The Seattle Python Interest Group (SeaPig) is hosting a NorthwestPythonSprint in Bellevue, Washington on October 23rd and 24th. Brian Dorsey invited me up to help run a PythonCard sprint as part of the festivities. I'll be giving a presentation on PythonCard Saturday morning as well as helping people work on their own PythonCard projects, fix bugs, and make additions to the framework and tools. Which projects we tackle will depend on how many people show up and what interests them the most. Recently, I've been porting Flash animations and simulations to PythonCard, so I would be interested in doing some more of that, but I expect I will probably spend most of my time coaching other people.

The sprint is free, so if you can make it to Bellevue, I encourage you to attend and learn how to do some GUI programming. Pleae sign-up on the wiki and send me an email if you are planning to attend. See you there!

I expect to release PythonCard 0.8.1 in the next few weeks before the coding sprint.


10:54:06 AM    comment []

  Friday, August 20, 2004


How to live on the edge with wxPython and not get cut (i.e. using wxPython 2.4.x and 2.5.x simultaneously).

I used this trick during the initial wxPython 2.5.1.5 release on Windows and I'm sure it works, as long as you know that the application you want to run is consistent about its use of wxPython packages. The old wxPython package was wxPython.wx so typically you would see people using it as:

from wxPython.wx import *

or

from wxPython import wx

There was an experimental package in later 2.4.x releases called wx, so if you look in site-packages you'll see wx and wxPython directories. There was a magical set of import statements that imported all the wxPython.wx stuff and did namespace manipulation for the wx package in anticipation of the new wx package that would be adopted with wxPython 2.5.x and later.

As of wxPython 2.5.x the real package is wx and now the wxPython package does the magical imports and namespace manipulation to provide backward compatability for code that still uses the old imports form above. Newer packages designed to work with wxPython 2.5.x and later use imports of the form:

import wx

or if you still believe namespace collisions will never happen to you

from wx import *

So, what's this got to do with living in both worlds? If you have wxPython 2.4.2.4 installed, then go into your site-packages directory and rename the wx dir to wx24 and the wxPython dir to wxPython24. Now install wxPython 2.5.2.7. Rename the wxPython dir to wxPython25 and then rename the wxPython24 dir to wxPython. Voila, now you can live in both worlds. PythonCard will never import from wxPython.wx so there won't be a conflict between 2.4.2.4 and 2.5.2.7 libraries and a package like Boa will always be importing from wxPython.wx so it won't ever try and get something from the 2.5.2.7 wx package.

If you want to test this, simply rename the wx package back to wx25 and run your code that requires wxPython 2.4.x. If anything ever tries to import from wx then an exception will be thrown. Similarly, you can test that code that wants 2.5.x doesn't ever import from wxPython.wx by renaming the wxPython dir back to wxPython24.

I never tested this on Linux and the process might be more complicated if the underlying wxGTK libs don't live under the wx and wxPython dirs, but it works like a champ on Windows. If you are running Mac OS X, you simply shouldn't run wxPython 2.4.x, wxPython 2.5.2.7 on Mac OS X is so much better, so just upgrade!


8:01:57 AM    comment []

  Wednesday, August 18, 2004


PythonCard 0.8

PythonCard is a GUI construction kit for building cross-platform desktop applications on Windows, Mac OS X, and Linux. The latest release of PythonCard includes over 50 sample applications and tools to help users edit and build applications in Python, plus many useful programs like the slideshow sample that you might want to use without ever bothering to do any coding. Check out the sample pages for screenshots and info about the samples. The more applications page has some info and screenshots on applications users have built with PythonCard.

New samples include ataxx, lsystem, moderator, montyhall, mp3player, reversi, and twistedEchoClient. There is also an experimental reStructuredText and HTML editor in the codeEditor directory called restEditor.

PythonCard requires Python 2.3 or higher and wxPython 2.5.2.7 or higher.

The documentation page has links to installation instructions for Linux, Mac OS X, and Windows that covers installing Python, wxPython, and PythonCard. The Linux instructions will be updated soon, but we're waiting for the RPMs to be built, so for now Linux users can just download and install from the tar.gz source archive. The documentation includes some walkthroughs, screenshots and info on using PythonCard and some of its tools such as the codeEditor, resourceEditor (layout tool), findfiles, and runtime shell.

There are many changes from the earlier PythonCardPrototype packages. See the migration_guide.txt file if you are upgrading from an earlier release. Check the changelog for a complete list of changes for release 0.8.

This is the first release targeted at resolving issues for a 1.0 release. If all goes well, PythonCard 1.0 will be out this winter after wxPython 2.6 is released.

If you would like to contribute to PythonCard, the first step is joining the mailing list.


12:48:30 PM    comment []

  Monday, August 16, 2004


At long last, wxPython 2.5.2.7 has been released. PythonCard release 0.8, which is dependent on 2.5.2.7 will be out shortly. Head over to the wxPython site or just follow the links below. If you are a Mac OS X user you should be particularly happy. I've been using wxPython 2.5.2.x on my PowerBook as my primary Python development platform for the last few months and it definitely looks and works well enough that I don't feel cheated anymore compared to wxPython on Windows. Kudos to Stefan Csomor, Kevin Ollivier, Robin Dunn and everyone else that have whipped WXMAC into shape.

wxPython 2.5.2.7 has been released, all users of 2.5.1.5 are strongly encouraged to upgrade. Please read the Recent Changes and Migration Guide for details.

A snapshot of the new style wxPython reference docs is available here. While most of the content is not yet present, the docs are still usable, and in fact helpful since they already accurately document what classes and methods are present in wxPython and what the parameter names are.

Robin's OSCON 2004 tutorial and presentation slides are available.


10:48:34 AM    comment []

  Saturday, July 31, 2004


OSCON 2004 is over. I had a lot of fun along with the rest of the crowd; there were over 2000 attendees this year. Obviously I haven't blogged in a long time, but I'm sure other bloggers did a good job of covering events and sessions.

I'm off to the Python VanPy Workshop '04 in Vancouver, British Columbia where I'll be giving a talk on PythonCard Monday morning. The keynotes and sessions for the conference are looking good.

When I get back I expect to start posting a little more regularly. I've been working on release 0.8 of PythonCard and in particular paying attention to any issues I find on Mac OS X that need to be tweaked. I expect to make a release soon after Robin releases wxPython 2.5.2.x


9:25:37 AM    comment []

  Monday, April 12, 2004


PythonCard 0.7.3.1

This is a bug fix release to correct a problem with menus on Linux when using wxPython 2.5.1.5. See the previous announcement for release 0.7.3 for more information.


9:59:47 AM    comment []

  Monday, April 05, 2004


PythonCard 0.7.3

PythonCard is a GUI construction kit for building cross-platform desktop applications on Windows, Mac OS X, and Linux. The latest release of PythonCard includes over 40 sample applications and tools to help users edit and build applications in Python. Check out the sample pages for screenshots and info about the samples. The more applications page has some info and screenshots on applications users have built with PythonCard.

The documentation page has links to installation instructions for Linux, Mac OS X, and Windows that covers installing Python, wxPython, and PythonCard. The documentation includes some walkthroughs, screenshots and info on using PythonCard and some of its tools such as the codeEditor, resourceEditor (layout tool), findfiles, and runtime shell.

The main point of this release is to add support for wxPython 2.5.x while still supporting wxPython 2.4.x. Check the changelog for a complete list of changes for release 0.7.3.

This is the last planned release of PythonCard as a "prototype". The status of the project on SourceForge has already been changed to beta. The current plan is for the next release to be 0.8, which will drop "Prototype" from the package name, include more documentation, and finalize some of the core APIs exposed to user code. If all goes well, there will be a PythonCard 1.0 release by early summer.

If you would like to contribute to PythonCard, the first step is joining the mailing list.


1:19:28 PM    comment []

  Tuesday, March 23, 2004


HyperCard: 1987 - 2004

Well it finally happened, Apple removed the HyperCard sub-directory from the main Apple site and you can no longer buy HyperCard from the Apple store. Of course, HyperCard was never updated for Mac OS X and I'm pretty sure the last update to HyperCard was version 2.4.1 back in 1998. But the removal of the product from the Apple site is the final nail in the coffin.

If you want to upgrade your old HyperCard stacks and use an xTalk-style language, then your best bet is probably Runtime Revolution. If you want more info on HyperCard, then you might want to check out the HyperCard wiki page.

Meanwhile, the Open Source PythonCard project will continue to plug away at a worthy successor using the Python programming language that will run on Windows, Linux, and Mac OS X. We're finally going to make a 1.0 release later this spring and I plan to get back to work on a more integrated HyperCard-like environment for PythonCard. If you would like to help make that happen, I invite you to email me and join the project.

Rest In Peace HyperCard. You are not forgotten and your children live on...


11:22:40 AM    comment []

  Sunday, March 14, 2004


When I need to serve up a few files for friends or try out some CGIs, XML-RPC, etc. I generally just fire up the PythonCard webserver sample. However, I find the following single line at a command prompt to be quite appealing for an instant web server.

    python -c "import SimpleHTTPServer;SimpleHTTPServer.test()"

It works on any OS where you have Python installed and since you can cd (change directory) to the dir you want to serve files from before running the command you don't have to mess with config files or moving files before serving them up. If you alias the command or make a batch file you won't have to remember the whole line. Here's an example run on my Mac.

[solo:~/] altis% python -c "import SimpleHTTPServer;SimpleHTTPServer.test()"
Serving HTTP on 0.0.0.0 port 8000 ...
localhost - - [14/Mar/2004 09:27:09] "GET / HTTP/1.1" 200 -
localhost - - [14/Mar/2004 09:27:28] "GET /gingerbread.py HTTP/1.1" 200 -

[via insom.me.uk]

Note that this blog entry was revised after a discussion on Simon Brunning's blog.


10:03:59 AM    comment []

  Wednesday, July 16, 2003


PythonCard 0.7.1

PythonCard is a GUI construction kit for building cross-platform desktop applications on Windows, Mac OS X, and Linux. The latest release of PythonCard includes over 40 sample applications and tools to help users edit and build applications in Python. Check out the sample pages for screenshots and info about the samples.

The documentation page has links to installation instructions for Linux, Mac OS X, and Windows that covers installing Python, wxPython, and PythonCard.

This is largely a bug fix release, but I'm happy to report that the resourceEditor allows you to actually drag components on Linux and Mac OS X now. Check the changelog for a complete list of changes for release 0.7.1.

I expect that as a result of some conversations at OSCON last week and new developers added to the project that activity on PythonCard will pickup again. If you would like to contribute, the first step is joining the mailing list.


12:25:18 PM    comment []

  Sunday, July 13, 2003


Visual Basic to Python

Paul Paterson has announced the first release of vb2py.

vb2py is a toolkit to aid in the conversion of Visual Basic projects to Python (using PythonCard). The conversion will eventually include both forms and code (modules and classes). Version 0.1 is mainly a form layout converter to PythonCard with a very simplistic code translation. The project roadmap shows the project's development timeline.

Converting VB to Python turns your VB projects into cross platform developments and allows full access to all Python's extensive library of modules.

Related link: PythonCardForVisualBasicUsers

Note that I will be releasing PythonCard 0.7.1 later this week. This fixes a number of critical problems with the current release.


11:05:40 AM    comment []

  Thursday, February 20, 2003


David McNab has written a walkthrough for PythonCard titled Increasing Usefulness with Timers and Threads


9:47:37 AM    comment []

  Sunday, February 09, 2003


Pygick

V. Satheesh Babu writes:

I wanted to find out how quick PythonCard is, to learn and use. Answer - it is the quickest to make GUIs! Then I thought about what kind of application I can write. Making a easy to use batch image processor seemed like a good idea. I vaguely remember seeing an application like this - so whatever I could remember from that applications' GUI as a base, made an application. I used PythonMagick, a library for ImageMagick functions.


10:03:26 AM    comment []

  Saturday, February 01, 2003


PyObjC is interesting, but not relevant to me

I don't expect I'll be using PyObjC much myself because I'm committed to writing cross-platform applications. That is why I'm using Python, wxPython and PythonCard to write apps that run on Windows, Linux, and Mac OS X. I don't know Objective-C and I really don't have any interest in learning a single OS API such as Cocoa anymore than I want to invest a lot of time in .NET that only works with Windows.

Yes, .NET may someday run on the Mac, but I'll bet it won't ever work on Linux. I think the Mono project is deluding itself if it thinks that someday it won't get crushed by the MS lawyers, so that isn't an option for .NET compatibility. I'll be very pleased if Mono does succeed, but I won't consider investing time even looking at C# and .NET for a couple of years. I'm very happy with Python and libs for Python.

I've changed my primary operating system many times in the past and I expect that I will again, so cross-platform, open source languages and libraries are the thing for me. In fact, all of the PythonCard code that I've written in the last year and half is now working on my G4 tower.


11:16:45 AM    comment []

  Monday, January 20, 2003


PythonCard 0.7

PythonCard is a GUI construction kit for building cross-platform desktop applications on Windows, Mac OS X, and Linux. The latest release of PythonCard includes over 40 sample applications and tools to help users edit and build applications in Python. Check out the sample pages for screenshots and info about the samples.

The documentation page has links to installation instructions for Windows that covers installing Python, wxPython, and PythonCard. Check the changelog for a complete list of changes for release 0.7.


10:22:53 AM    comment []

  Monday, December 23, 2002


New Sample Pages

There are new pages on the PythonCard web site showing off the samples included with PythonCard. Some of the samples (gadflyDatabase, life, simpleIEBrowser, spirograph) are not in release 0.6.9, but you can get them from cvs.

There is a wiki page describing how to install and use cvs. If you want to keep up with changes between releases, you should definitely use the cvs version of PythonCard as releases are only made every one to three months. A complete list of changes since the last release is available in the changelog.


2:15:19 PM    comment []

  Thursday, December 19, 2002


case-insensitive sort of list of strings

I added a new recipe to the Python Cookbook.

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/170242

There are some additional comments about the recipe on the PythonCard-users mailing list.


5:01:23 PM    comment []

  Monday, October 28, 2002


PythonCard 0.6.9

PythonCard is a GUI construction kit for building cross-platform desktop applications on Windows, Mac OS X, and Linux. The latest release of PythonCard includes over 30 sample applications and four tools to help users edit and build applications in Python.

The documentation page has links to installation instructions for Windows that covers installing Python, wxPython, and PythonCard. Check the changelog for a complete list of changes for release 0.6.9.


9:08:19 AM    comment []

  Monday, October 21, 2002


Jon Udell has posted an article about Python as the "scripting language [to] drive a major, user-facing, GUI-intensive application". I have often wondered myself why Mahogany wasn't done in Python and wxPython instead of C++ and wxWindows.

We're exploring the scriptability of apps with PythonCard. Both the codeEditor and textEditor expose the Python shell, which is built-in to all PythonCard applications. However, rather than just having a menu item to hide and show the shell, we added the ability to run scripts, or Scriptlets as I like to call them which are analogous to the VBA scripts people can run in Microsoft Office.

The entire object model of a PythonCard application is exposed, so if an app doesn't have the feature you want, you can probably extend it with a short "macro" in Python. All scripts are run in the shell, so they share the shell namespace and thus scripts can share variables since the namespace doesn't go away until the application is closed. I posted an example of a scriptlet with the codeEditor back in May.


12:36:02 PM    comment []

  Thursday, July 18, 2002


Building GUI Applications with PythonCard and PyCrust by Patrick K. O'Brien

Patrick put together this article for O'Reilly to give people a taste of what we'll be covering during our OSCON presentation on Thursday, July 25th.


5:09:58 PM    comment []

  Wednesday, July 17, 2002


PythonCard 0.6.8

PythonCard is a GUI construction kit for building cross-platform desktop applications on Windows, Mac OS X, and Linux. The latest release of PythonCard includes over 30 sample applications and four tools to help users edit and build applications in Python. This release also supports the new wxPython 2.3.3 preview for Mac OS X.

The documentation page has links to installation instructions for Windows that covers installing Python, wxPython, and PythonCard. Dan Shafer added an extensive resourceEditor overview last month that should be of interest to anyone using PythonCard. There is a set of Wiki pages for "in progress" documentation and to supplement the main web site. Check the changelog for a complete list of changes for release 0.6.8.


3:54:34 PM    comment []

  Monday, June 24, 2002


PythonCard Name Change?

Should the PythonCard project have a different name? A thread started up last week about maybe changing the name. You can follow the discussion in the mailing list archive. I created a PythonCardNameChange wiki page that covers some of the issues and provides a bit of history on how we arrived at the project name in the first place. The early posts from the mailing list are good background material. You'll have to click the "prev 20" link to move backwards through the threads, since the link above points to the start of the mailing list.


9:35:48 AM    comment []

  Friday, June 14, 2002


PythonCard 0.6.7

PythonCard is a GUI construction kit for building cross-platform desktop applications on Windows, Mac OS X, and Linux. The latest release of PythonCard includes over 30 sample applications, new additions include chat, webserver, pictureViewer, slideshow, and webgrabber, a sample to download web sites. The webserver sample comes ready to run XML-RPC server scripts. This release also supports the new wxPython 2.3.3 preview for Mac OS X.

Four of the samples have been promoted to tools status: codeEditor, findfiles, resourceEditor, and textEditor.

The documentation page has links to installation instructions for Windows that covers installing Python, wxPython, and PythonCard. Dan Shafer added an extensive resourceEditor overview for this release. There is a new set of Wiki pages for "in progress" documentation and to supplement the main web site. Check the changelog for a complete list of changes for release 0.6.7.


8:38:31 AM    comment []

  Wednesday, June 12, 2002


Just a reminder that Patrick O'Brien and I will be doing a presentation at the O'Reilly Open Source Convention (OSCON) this summer in San Diego called Building GUI Applications With PythonCard And PyCrust. The conference is from July 22-26, and our session is scheduled for Thursday, July 25 from 1:45pm - 2:30pm in the Marina III room.

If you will be attending OSCON and would like to find out more about PythonCard, please let me (Kevin Altis) know. I will be in San Diego at the Sheraton all week and would love to get together to discuss PythonCard with anyone interested.


2:40:12 PM    comment []

XML-RPC server in PythonCard 0.6.7

A new release of PythonCard should be out in the next couple of days. You can download it from cvs now if you don't want to wait. Among the many new samples is a GUI front-end to the web server that comes with the Python Standard Libraries. In addition to serving files, the webserver sample can do CGI, so it is a great way to get a web server up quickly on your desktop; all you have to do is double-click the script. Several example CGI scripts are included with the server.

I added Mark Pilgrim's PyWebServices scripts, so the webserver can act as an XML-RPC server too. After starting up the webserver sample you can test the XML-RPC server capabilities by running the radioclient sample, which automatically shows the shell and imports the xmlrpclib module. Then try this in the shell:

>>> server = xmlrpclib.Server('http://localhost/cgi-bin/webservices.py')
>>> server.system.listMethods()
{'sample.helloWorld()': 'None', 'examples.getStateName(stateIndex)': 'None',
'system.listMethods()': 'None'}
>>> server.sample.helloWorld()
'Hello World!'
>>> server.examples.getStateName(1)
'Alabama'
>>> server.examples.getStateName(50)
'Wyoming'

1:29:22 PM    comment []