From: Jason Cunliffe
Your post prompted me to check out PythonCard. Downloaded it to Win89se syetem with Python 2.1 installed.
You'll also need wxPython for Python 2.1 http://www.wxpython.org/ The pre-built binaries are at: http://www.wxpython.org/download.php#binaries
Took a summer break from computers recently, so I'm probably being very dumb but cannot find any 'getting started' instructions anywhere.
There aren't any docs other than what is in the docs directory, I'm working on them, so I'll use this opportunity to create some 'content' for the first draft Getting Started document.
How do I start PythonCard? Do / Can / Should I run it from PythonWin, IDLE or Pycrust? What are the first 10 things to do to get it up and running?
Assuming Python 2.1 and wxPython are installed and running correctly, you need to move the PyCrust and PythonCardPrototype package directories to your python21 directory. If you want, you can move the 'samples' directory to a more convenient place. The only thing you run are the standalone samples or a sample you write yourself. All you have to do is double-click one of the .py files like 'samples\minimal\minimal.py'. You can also run the files from the command-line, and the command-line is probably preferred if you want to invoke one of the debug windows (see below) with the program. The one thing you should not do is run a sample from within PythonWin or IDLE since neither of those IDEs launches an app in a separate process, so you'll run into GUI contention issues. You can launch from an IDE like Komodo. What I typically do is edit in PythonWin and keep a shell window (DOS prompt) open to run the program once I make an edit change; alternatively keep a shortcut to the program or an Explorer window open to the directory the program is in so you can double-click it. Sometime in the future, there will be a PythonCard environment that allows you to edit scripts and run. The files ending in '.rsrc.py' are the resource files and are not runnable themselves. There is a description of each sample in samples.txt of the docs directory. The following files are standalone samples (directory structure shown): samples addresses addresses.py conversions conversions.py dbBrowser dbBrowser.py This sample requires mySQL to be installed and running. dialogs test_dialogs.py findfiles findfiles.py minimal minimal.py You should copy the minimal folder when you're ready to start your own PythonCard program. See the tutorial.txt file in the docs directory for more information. proof proof.py resourceEditor resourceEditor.py This is the GUI editor for resource files. Release 0.4.3 doesn't support saving files, but you can open any .rsrc.py file, add widgets, delete, move and resize, and duplicate widgets. The Property Editor window is used to change attributes of each widget such as the backgroundColor. searchexplorer searchexplorer.py sounds test_sounds.py SourceForgeTracker SourceForgeTracker.py textIndexer textIndexer.py This sample requires either Zope or standalone ZODB to be installed. tictactoe tic.py turtle test_turtle.py widgets test_widgets.py worldclock worldclock.py You can change the .py extension to .pyw on any of the samples if you want to get rid of the console window that pops up when you run the program. Command-line options Valid command-line options are: -m (Message Watcher), -p (Property Editor), -s (Shell) and in cvs -n (Namespace Viewer); the Namespace Viewer is in cvs, but not in a release version yet. Invoking any of those options will actually give you all of them and then you can hide/show any of the windows via the Debug menu. You can set the default position and size of each window and whether it appears by default by copying the 'pythoncard.config.py' file in the PythonCardPrototype directory and renaming the copy to 'pythoncard.user.config.py' This is what mine looks like: { 'gui':'wxPython', 'logfile':'pythoncard.log', 'showMessageWatcher':0, 'messageWatcherPosition':(900, 0), 'messageWatcherSize':(200, 300), 'messageWatcherVisible':1, 'showPropertyEditor':0, 'propertyEditorPosition':(750, 350), 'propertyEditorSize':(360, 240), 'propertyEditorVisible':1, 'showShell':0, 'shellPosition':(50, 600), 'shellSize':(700, 230), 'shellVisible':1, 'showNamespace':0, 'namespacePosition':(0, 0), 'namespaceSize':(800, 300), 'namespaceVisible':1, 'defaultStackPosition':(5, 5), 'enableLogging':0 } I don't have any of the windows enabled by default since I use several of the samples all day long (worldclock, searchexplorer, and SourceForgeTracker) and don't want a debug menu or debug windows for them. I run a sample from the shell when I want debug windows.
anyone I think. What level of programming experience do you think PythonCard is good for?
If someone is up for Python, I don't think PythonCard takes much more effort, less if you think of the pain of doing command-line input/output. It is mostly a matter of copy and paste and following some coding conventions, which we're in the process of documenting. You don't have to worry about event tables, id bindings, window handles, pack, etc. At this point, the widget set is much more limited than if you programmed wxPython directly, but we're closing the gap each day.
Myself I love Pthon and much more besides, but still find it very frustrating installing and running Python packages. Anything you can do to enhance this aspect of PythonCard is for the good I am sure. Meanwhile I signed up to the PythonCard mailing list and will do some more homework, browse the archives etc.
We've debated back and forth on the installation issue. On one hand, we should support dist-utils, but we also need to make it so that you just double-click and run a normal installer since requiring the user to type 'setup install' defeats part of the purpose. Since we're at the prototype stage, that's a bit much for releases that happen every few days. For now, you just drop the directories into your python21 directory and you're set.
Thanks in advance any help - Jason
Thanks a lot, keep the questions coming. I'm going to work on the Getting Started and post to the pythoncard-users mailing list later today. ka