GitHub - benallard/pythoncard: javacard framework in python. PythonCard download.
Pycrust tutorial. Building GUI Applications with PythonCard and PyCrust. Building GUI Applications with PythonCard and PyCrust Pages: 1, 2, 3, 4 We said the GUI development process is opaque and we probably need to explain that one first.
What we mean is simply that it can be difficult to figure out what is going on inside the various widgets that make up a graphical interface. Python has wonderful runtime introspection capabilities and for most non-GUI applications it is a relatively simple matter to load modules into the Python shell, type a few commands, and look at the resulting state of any object. But the event-driven nature of GUI applications makes it difficult to do this, resulting in objects and actions that are opaque. We thought it would be nice if you could inspect the state of any graphical object just as easily.
Because PyCrust is written in Python using the wxPython toolkit, it can be embedded in any wxPython application without conflicting with the application's event loop. The shell frame is created as a wxPython MiniFrame. PythonCard Walk-through No. 1. This document is designed to help people who are interested in learning and using PythonCard but who are not professional programmers and who do not have deep Python scripting skills to learn their way around the environment and to understand how PythonCard applications get built.
Before You Read This Document It will be helpful if, before you attempt to follow along with this document, you are sure you've done the following: While it is not necessary for the purposes of this document that you understand how to program in Python, you should know that all of the real heavy lifting in PythonCard is done using Python programming. So if you haven't yet learned Python, you can still follow the basics of this walk-through.
But you won't be able to do much in the way of PythonCard development without at least a basic understanding of and comfort level with Python programming. Some Basic Preparation This document assumes you are running PythonCard on a Windows machine. Click "OK. " Figure 1. Pythoncard mail list. RE: Catching Key Presses Kevin Altis <altis <at> semi-retired.com> 2003-05-19 17:24:27 GMT > From: Phil Edwards > > I'm sure I'm going to find that this is remarkably easy, but...
> > I'm trying to add some code to a PythonCard app to make it respond to > function key presses, e.g do thing #1 if the user presses F4, thing #2 > if she presses F5, etc, etc. > > I can see keyDown, keyPress and keyUp events firing in the message > watcher when I press random keys, but only when one of the components on > the panel has focus. > > Is there a way to make the panel itself respond to key press events, > regardless of which component currently has the focus?
There are a couple of issues. One, no events are currently bound to the underlying wxPanel, so you would have to do that manually. There's something like that in the slideshow sample. (Continue reading) PythonCard / Mailing Lists. PythonCardTricks. A start of a small collection of very useful to know tidbits, which you can find yourself by reading a lot of sample code and component code... or by looking here.
How do I pass an argument to a child window? When you create a child window, you are not able to pass arguments via the model.ChildWindow() method, and you can't call the child's init method either. But, you can pass arguments to a child window, here's how. You have a class, Foo, that creates a child window Bar when Button1 is clicked. Toggle line numbers 1 from PythonCard import model, dialog 2 import bar 3 import dao 4 class Foo(model.Background): 5 6 def on_initialize(self, event): 7 self.databaseName = 'mydb.db' 8 9 def on_Button1_mouseClick(self, event): 10 self.childWin = model.ChildWindow(self, bar.Bar) Now, the trick is to pass the database name to bar.Bar so that Bar can access the database on initialization... And in Bar - ...wait, how did that work?
Time for a brief explanation of the event queue in PythonCard.