<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: pythoncard</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/pythoncard.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2002-10-27T10:58:01+00:00</updated><author><name>Simon Willison</name></author><entry><title>PythonCard scriptlets</title><link href="https://simonwillison.net/2002/Oct/27/scriptletsAndPythonCard/#atom-tag" rel="alternate"/><published>2002-10-27T10:58:01+00:00</published><updated>2002-10-27T10:58:01+00:00</updated><id>https://simonwillison.net/2002/Oct/27/scriptletsAndPythonCard/#atom-tag</id><summary type="html">
    &lt;p&gt;Kevin Altis on &lt;a href="http://radio.weblogs.com/0102677/2002/10/21.html#a20" title="Kevin Altis: Monday, October 21, 2002"&gt;scripting applications&lt;/a&gt; written in PythonCard:&lt;/p&gt;

&lt;blockquote cite="http://radio.weblogs.com/0102677/2002/10/21.html#a20"&gt;&lt;p&gt;
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.
&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Kevin calls these scripts "scriptlets" and has posted an &lt;a href="http://radio.weblogs.com/0102677/categories/pythoncard/2002/05/10.html" title="codeEditor"&gt;example scriptlet&lt;/a&gt; that can insert the current date and time straight in to any text file opened with the PythonCard codeEditor.&lt;/p&gt;

&lt;p&gt;Sam Ruby was recently quoted as &lt;a href="http://weblog.infoworld.com/udell/2002/10/07.html#a461" title="Java, C#, Python, and Ruby"&gt;stating the following&lt;/a&gt; over on Jon Udell's blog:&lt;/p&gt;

&lt;blockquote cite="http://weblog.infoworld.com/udell/2002/10/07.html#a461"&gt;&lt;p&gt;
While Java and C# battle over who is the rightful successor to C++, it is quite possible that a language like Python (or, dare I say it, Ruby) will ultimately be the one that wins out.
&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;This is an interesting train of thought. Scripting languages such as Python undeniably lead to faster development times (no compile cycle, less book keeping syntax to worry about) and as computers continue to get faster and cheaper the overhead associated with these languages becomes less and less important. Kevin's concept of an application with an exposed object model that can be tweaked by the user is a powerful idea, and one that could bring real benefits; Python is not a difficult language to program in, and applications which can be scripted easily can become very popular (just look at the &lt;a href="http://www.mirc.com/"&gt;mIRC&lt;/a&gt; community for an example of that). Unfortunately the ability to script an application also leads to inherent security flaws, as have been seen with VBScript and Microsoft Office - although in the case of Office most of the problems stem from the ability to add macros to individual documents (there are surprisingly few mIRC security alerts despite the in built scripting engine).&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/jon-udell"&gt;jon-udell&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sam-ruby"&gt;sam-ruby&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pythoncard"&gt;pythoncard&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="jon-udell"/><category term="python"/><category term="sam-ruby"/><category term="pythoncard"/></entry><entry><title>Java GUI Builder</title><link href="https://simonwillison.net/2002/Sep/13/javaGUIBuilder/#atom-tag" rel="alternate"/><published>2002-09-13T17:58:35+00:00</published><updated>2002-09-13T17:58:35+00:00</updated><id>https://simonwillison.net/2002/Sep/13/javaGUIBuilder/#atom-tag</id><summary type="html">
    &lt;p&gt;One of the things I really like about &lt;a href="http://www.pythoncard.org/"&gt;PythonCard&lt;/a&gt; is that it enables (and in fact actively encourages) you to completely separate the GUi of your application from the program logic. In PythonCard you design your GUI by adding and dragging elements around in the resource editor, then create a simple Python class with event handlers to define what should happen when your GUI is interacted with. Now, thanks to the &lt;a href="http://jgb.sourceforge.net/"&gt;Java GUI Builder&lt;/a&gt; (spotted on &lt;a href="http://www.brunningonline.net/simon/blog/archives/000393.html#000393" title="Java Gui Builder"&gt;Small Values of Cool&lt;/a&gt;), you can do the same thing in Java.&lt;/p&gt;

&lt;p&gt;The GUI builder allows you to define your user interface in an XML file, which is then interpreted by Java at run-time. This allows you to make changes to the interface without recompiling the program (or editing any Java code), and also gives users the ability to edit their interface without needing to alter your code. It's a very clever piece of code.&lt;/p&gt;

&lt;p&gt;XML seems to be a popular choice for defining GUI's these days - Mozilla has &lt;a href="http://www.mozilla.org/xpfe/xptoolkit/xulintro.html" title="Introduction to a XUL Document"&gt;XUL&lt;/a&gt;, &lt;a href="http://www.xwt.org/"&gt;XWT&lt;/a&gt; allows developers to write web based GUI applications with XML and now the Java GUI Builder takes this trend a step further. It seems like a logical progression - after all, GUIs are basically collections of nested components and XML fits that kind of situation like a glove.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/java"&gt;java&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pythoncard"&gt;pythoncard&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="java"/><category term="pythoncard"/></entry><entry><title>PythonCard and PyCrust</title><link href="https://simonwillison.net/2002/Jul/22/pythonCardAndPyCrust/#atom-tag" rel="alternate"/><published>2002-07-22T23:28:31+00:00</published><updated>2002-07-22T23:28:31+00:00</updated><id>https://simonwillison.net/2002/Jul/22/pythonCardAndPyCrust/#atom-tag</id><summary type="html">
    &lt;p&gt;Patrick O'Brien: &lt;a href="http://www.onlamp.com/pub/a/python/2002/07/18/pycrust.html"&gt;Building GUI Applications with PythonCard and PyCrust&lt;/a&gt;. I'm a big fan of &lt;a href="http://www.pythoncard.org/"&gt;PythonCard&lt;/a&gt;, an excellent toolkit for creating GUI applications in Python that seperates the GUI layout from the program logic and makes it ridiculously easy to put together a basic GUI in a short space of time. Patrick is the developer of PyCrust, an interactive shell for debugging and interacting with GUI components, and is also a contributor to PythonCard as a whole. Patrick and Kevin Altis, the lead developer of PythonCard, will be presenting &lt;a href="http://conferences.oreillynet.com/cs/os2002/view/e_sess/3039"&gt;a session&lt;/a&gt; on PythonCard at &lt;acronym title="The O&amp;apos;Reilly Open Source Convention"&gt;OSCON&lt;/acronym&gt; on Thursday.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pythoncard"&gt;pythoncard&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="python"/><category term="pythoncard"/></entry><entry><title>Meta weblog API</title><link href="https://simonwillison.net/2002/Jun/14/metaWeblogAPI/#atom-tag" rel="alternate"/><published>2002-06-14T07:02:13+00:00</published><updated>2002-06-14T07:02:13+00:00</updated><id>https://simonwillison.net/2002/Jun/14/metaWeblogAPI/#atom-tag</id><summary type="html">
    &lt;p&gt;I'm itching to get an XML-RPC interface to this blog up and running so I can start playing with blogging tools (or roll my own in &lt;a href="http://www.pythoncard.org/"&gt;PythonCard&lt;/a&gt;).  It looks like Dave Winer's &lt;a href="http://www.xmlrpc.com/metaWeblogApi"&gt;MetaWeblog API&lt;/a&gt; is just what I need. It describes an XML-RPC interface with 3 methods: &lt;code&gt;metaWeblog.newPost&lt;/code&gt;, &lt;code&gt;metaWeblog.editPost&lt;/code&gt; and &lt;code&gt;metaWeblog.getPost&lt;/code&gt;. More importantly, the standard supports complete flexibility in the data that is sent along with the request. My entries consist of a body, an optional permalink (one is generated if none is specified), optional categories and an optional search string for a "Google It!" link if one is required. The MetaWeblog API looks ideally suited to handling this, and is fully extensible should I change the format of my entries in the future.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/blogging"&gt;blogging&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/metaweblogapi"&gt;metaweblogapi&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/xml-rpc"&gt;xml-rpc&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pythoncard"&gt;pythoncard&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="blogging"/><category term="metaweblogapi"/><category term="xml-rpc"/><category term="pythoncard"/></entry></feed>