This is a page for describing sample applications that might be built with PythonCard.

Introduction

The main purpose of the samples is to "stress" the PythonCard framework and make sure that the framework is robust and full-featured, yet still simple for the beginner to use. "We learn by doing". As users (programmers) write more samples, we are able to identify which portions of the framework are missing, too simplistic or too complex or just plain broken. The PythonCardPrototype API changes as we identify these issues and fix the framework and the samples always represent the latest version of the API. We don't have a complete API yet, that is why we refer to the code as a PythonCard prototype.

It is essential that we create lots of samples to identify framework issues in order to avoid creating a framework only suitable for simplistic "toy" programs that are only one step beyond "hello world". Equally bad would be a framework that is too general and requires the user to do a lot of work just to write a basic program; simple programs should be simple to write; That is the reason we aren't forcing a model-view-controller (MVC) paradigm on the user, MVC is not easy to grasp or use correctly.

The samples also serve as a learning tool. Since there is little documentation for PythonCard right now, the best way to learn to use PythonCard is to copy and modify the samples. The list of examples on this page is by no means complete. There are a great many more example programs you will find in the Pythoncard\example directory.

Note that due to the current limitations of the framework, some samples use wxPython method calls directly. The wxPython calls can usually be identified via the method name which will start with a capital letter (e.g. GetSize instead of getSize).

Please help the PythonCard project, by submitting your own samples and asking questions about PythonCard on the mailing list.

Current Samples

existing samples in cvs

There are screenshots of some of the samples on the main PythonCard web site.

Ideas for updating existing samples

doodle

Update doodle to a more full-featured paint program.

findfiles

Change algorithm to use threads. Provide a built-in preview window. A single click would display the file in a preview window, a double-click would launch and external viewer. Provide "viewers" for common file types. Display search result "in context."

Use walk with callbacks instead of the current sgrepmod algorithm.

Post an event to append result for each file to the list, maybe switch to a List or wxSTC for the results.

[DGS] It would be very cool if we could have a dropdown/combo box that we could use to save searches for specific expressions rather than just entire .GREP files. This would allow me, e.g., to set up a search for all references to mouse events, then apply it to whatever directories were relevant in a context without the necessity of remembering and retyping GREP syntax for the search each time. We could even preload with some useful search terms.

worldclock

Add an alarm?

[DGS] How about a "hover" or click event to bring up the time at any point on the globe?

[KEA] 2004-05-08 I'm not sure it is worth doing anything more with the worldclock sample, but I'll leave these comments in for now.

Sample Application Ideas

Diary and or Notes

Both of these should probably just subclass flatfileDatabase or just created as layouts for use with the existing flatfileDatabase sample.

Simple mail client

This sample should utilize the MultipleColumnList component.

Look at Mark Lutz's PyMailGUI in Programming Python, 2nd Edition

http://www.python.org/doc/current/lib/internet.html

http://www.python.org/doc/current/lib/netdata.html

Any other sample code in Python to draw from?

Sending mail

Simple newsreader

NNTP

This sample should utilize the Tree component.

RSS aggregator

Maybe do something based on or interfacing to Peerkat? The SF pages is at http://sourceforge.net/projects/peerkat/

Peerkat uses gadfly so that might mesh nicely with some of the work Andy Todd is doing with the dbBrowser and flatfileDatabase samples.

Simple graphing program

This might just be a front end to an existing graphing program done in PIL or another format.

Bookmark (Favorites) manager

This should talk the file formats of the major browsers; IE, Mozilla (and Netscape), Opera and Konqueror.

It would be nice if it included a feature to check that all of the bookmarks in your collection are still valid. My bookmark file tends to suffer from link rot a lot. A good starting point is this recipe from the cookbook

To Do List

Dan Shafer is working on one of these by subclassing the flatfileDatabase module.

[KEA] 2004-05-08 Dan is working on Revolution instead of PythonCard these days, so this will probably never see the light of day.

Games

minesweeper, card games like solitaire or freecell, front-end to the GNU chess engine...

PowerPoint alternative for presentations

This should read and write some existing XML "slide" formats rather than creating yet another format. At a minimum, the user should be able to set several fonts and sizes, include images, and preformatted text for source code. This probably would be done easily if the "slides" are just done as HTML.

[Beckel] This should also have navigation support, with the option of using the keyboard or mouse to move to the next/previous slides.

[KEA] 2002-06-23

The slideshow sample can display HTML as well as images. It doesn't let you create slides, but it has all the basic navigation and display options for doing a slideshow.

Profiler

I've never used the Python profiler, but I wonder whether it would be useful to wrap up its usage as a codeEditor extension and then have a background that can display the results like this sample?

http://www.jazzbo.org/projects.html

PythonCardSampleApps (last edited 2011-05-15 15:59:09 by 173-148-204-222)

NOTE: To edit pages in this wiki you must be a member of the TrustedEditorsGroup.