from __future__ import *
MochiKit Intro - Ajax Experience Slides
May 11, 2006 at 05:00 PM | categories: python, docutils, AJAX, javascript, MochiKit | View CommentsThe slides from my MochiKit Intro talk at The Ajax Experience 2006 are up:
http://svn.mochikit.com/presentations/2006/ajax_experience/slides.html
They were built with a slightly modified s5 (so that I could toggle an interactive mode with ctrl-i to demonstrate MochiKit inline without advancing the slides), using the docutils rst2s5 tool.
The reStructuredText source, build scripts, etc. are all in the repository here:
http://svn.mochikit.com/presentations/2006/ajax_experience/
MochiKit documentation overhaul
November 11, 2005 at 10:40 PM | categories: python, docutils, AJAX, javascript, MochiKit | View CommentsIn preparation for MochiKit's 1.1 release, I've thrown together a pair of custom docutils roles for the MochiKit documentation so that I can throw named anchors on each function.
Now the documentation is cross-referenced rather nicely and it should be relatively easy to scrape out some metadata, perhaps for use by the interpreter, making a function index, search, etc.
reStructuredText and WordPress
December 29, 2004 at 11:44 PM | categories: python, docutils | View CommentsWell, I've installed WordPress, because it was a lot easier than anything else that can use reStructuredText. I'm using a slightly modified version of this plugin. Hopefully I'll be able to whip together some quick scripts to import all of the entries from the old PyDS (ughh) blog and post them here, probably with the XML-RPC interface.
This post was written with MarsEdit 1.0, but I would like something that understands reStructuredText in the future. Maybe a future version will allow me to write a PyObjC plugin that gives it this support?
PyObjC, NSTableView, Cocoa Bindings Tutorial
April 04, 2004 at 09:02 PM | categories: python, docutils, PyObjC | View CommentsI created a small Cocoa Bindings example in the PyObjC CVS repository last night, and decided to follow it up with a step by step tutorial. I figured this would be useful as the demonstration I gave during my PyCon talk isn't anywhere in my slides.
The tutorial assumes you are using PyObjC CVS (or whatever release comes after 1.1b1). In order to set up an appropriate environment you will have to perform the following steps:
- Make sure you're running OS X 10.3 or later, and you have the latest Xcode installed. If not, it's time to upgrade. Cocoa Bindings are not available in previous versions of OS X.
- Check out PyObjC CVS
- sudo python setup.py install
- Make the folder /Library/Application Support/Apple/Developer Tools/Project Templates
- Copy Xcode/Project Templates/Cocoa-Python Application from your PyObjC checkout into that folder.
The finished example is in Examples/CocoaBindings/TableModel of the PyObjC source tree, but the tutorial (PasswdViewer Tutorial PDF) is self-contained so using the finished example is not going to teach you anything about Interface Builder or creating projects with the new template.
If you're interested in how I created the tutorial, here is the reStructuredText source document. Note that the screenshots are crucial to getting the hang of this, so you should really be using the PDF. I'll post the code I used to create the tutorial PDF (and my PyCon slides) at some point in the future if there is interest, but it's merely a small hack of the PythonPoint output code already in docutils CVS (somewhere in the sandbox).
Making docutils do python syntax highlighting (for HTML output)
November 10, 2003 at 06:18 PM | categories: python, docutils | View Commentshttp://undefined.org/python/docpytils-0.0.tgz is a simple docutils directive that does simple python syntax highlighting in ReST.. basically, after importing docpytils, you can do something like this:
.. pycode::
python code here..
Like raw, you can also use :file: or :url: as arguments.
Output will look like this:
>>> from __future__ import * File "<stdin">, line 1 SyntaxError: future statement does not support import * >>>