27th October 2002
Kevin Altis on scripting applications written in PythonCard:
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.
Kevin calls these scripts “scriptlets” and has posted an example scriptlet that can insert the current date and time straight in to any text file opened with the PythonCard codeEditor.
Sam Ruby was recently quoted as stating the following over on Jon Udell’s blog:
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.
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 mIRC 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).
More recent articles
- Weeknotes: Embeddings, more embeddings and Datasette Cloud - 17th September 2023
- Build an image search engine with llm-clip, chat with models with llm chat - 12th September 2023
- LLM now provides tools for working with embeddings - 4th September 2023
- Datasette 1.0a4 and 1.0a5, plus weeknotes - 30th August 2023
- Making Large Language Models work for you - 27th August 2023
- Datasette Cloud, Datasette 1.0a3, llm-mlc and more - 16th August 2023
- How I make annotated presentations - 6th August 2023
- Weeknotes: Plugins for LLM, sqlite-utils and Datasette - 5th August 2023
- Catching up on the weird world of LLMs - 3rd August 2023
- Run Llama 2 on your own Mac using LLM and Homebrew - 1st August 2023