sarwat.net * OpenSource

Source code is distributed under a BSD-style license unless otherwise noted;
read the license in the package contents for details.
Most archives are compressed using bzip2.

Python Modules & Tools

The plistservices module lets you read and write CoreFoundation XML property lists. userdefaults provides a Python interface to access the host OS’s persistent defaults (preferences). CFPython is some nice glue between CoreFoundation objects and the Python C API.

plistservices

Reads and writes CoreFoundation XML Property List files, and is actually being used to generate this web page. Includes an ISO 8601 string parser conforming to w3c’s note. plistservices is more functional than the version of plistlib included with Python 2.3 and has an interface similar to Foundation’s NSPropertyListSerialization.

Requires Python 2.3.

v2 Small fixes; Date.dateWithDateTime wasn’t a class method and Date.dateFromStandard8601String sometimes returned datetime.datetime objects instead of plistservices.Date.

plistservices-2.tar.bz2 11 K bzip2’d tar archive

userdefaults

UserDefaults is an interface for persistent user defaults (user preferences) for Python programs. UserDefaults provides an application defaults dictionary that can store CoreFoundation-style property list objects. userdefaults consists of a pure python module that uses a back-end extension module to access the operating system’s preferences API.

Distribution includes binaries for Apple’s Python 2.2 and Python 2.3 with Mac OS X. The userdefaults module requires Mac OS X 10.2.

v2 cleans the Python code up a little. Additionally, the setup script works around distutils tying the built binaries to a specific version of Mac OS X (such as 10.2.6 or 10.2.7).

userdefaults-2.tar.bz2 55 K bzip2’d tar archive

CFPython

Source code to the CFPython library included with the userdefaults module.

CFPython is a C library intended to make programming with the Python C API and CoreFoundation easier. CFPython makes copies of Python objects as their mutable CoreFoundation counterparts, and is able to perform the same translations in reverse.

CFPython-1-source.tbz2 15 K bzip2’d tarball

AppleScripts

Here’s a section I’ve wanted to put up for years. My AppleScript uses keep changing, so many cool scripts (and dumb scripts) I wrote long ago aren’t relevant today. My most frequently used scripts (only?) are these ones that I’ve bound to my keyboard keys (f13-f16 +modifiers, using DragThing) to control iTunes.

iTunes Scripts for DragThing

foobar.

Tomato Torrent

An Xcode project for my version of BitTorrent. This package does not include the BitTorrent source. You’d have to get that from BitTorrent.com.

Use bzcat «file» | pax -r to extract.

Tomato Torrent v20 (1.5.1).

Tomato 1.5.1 and BitTorrent 4.2.0.

TomatoTorrent-20-source.tbz2 284 K bzip2’d tarball

Tomato Torrent v18 (1.5b1).

Tomato 1.5b1 and BitTorrent 4.2.0.

TomatoTorrent-18-source.tbz2 271 K bzip2’d tarball

CoreFoundation-Lite for FreeBSD

This is my port of CoreFoundation-Lite to FreeBSD. CoreFoundation-Lite is the open source subset of Apple’s CoreFoundation. The following is from Apple’s description of CoreFoundation,

Core Foundation is a library of low-level services which help you to build cross-platform, easily localized applications. Core Foundation provides abstractions for common data types, facilitates internationalization with Unicode string storage, and offers a suite of utilities such as plug-in support, XML property lists, URL resource access, and preferences.

Distributed under the APSL.

Makefile Tweak for v. 220

Apply this patch to any of the below 220s. It's a one-liner.

CoreFoundation Lite v. 220

Comes in two flavours; one with thread safety enabled (using pthread mutexes) and a ‘dumb’ one like the 179.1 implementation. The Makefile is much friendler to non-Darwin unicies than the standard CF Makefile.

Thread-safe implementation

CFLite-220-FreeBSD-Mutex-Aug-22-01.tgz 471 K gzip’d tarball

Basic implementation

CFLite-220-FreeBSD-Basic-Aug-22-01.tgz 474 K gzip’d tarball

Diffs from CF-Lite 220 to FreeBSD versions

CF-Lite-220-FreeBSD-Aug-23-01-diffs.tgz 10 K gzip’d tarball

CoreFoundation Lite v. 179.1

This version has been incorporated into Mac OS X (179 is circa 10.0 if my memory’s right).

CFLite-Dec-11-00-FreeBSD.tgz 350 K gzip’d tarball