PageRenderTime 18ms CodeModel.GetById 14ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

HTML | 54 lines | 47 code | 7 blank | 0 comment | 0 complexity | c3c9f0c66d127e6e528839e3b0422ec7 MD5 | raw file
 1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 2        "">
 3<html lang="en">
 5	<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
 6	<title>Creating a User Interface with MacPython</title>
 7	<meta name="generator" content="BBEdit 6.5.3">
 8	<link rel="SHORTCUT ICON" href="pythonsmall.gif">
 9	<META NAME="AppleIcon" CONTENT="pythonsmall.gif">
12<h1>Creating a User Interface with MacPython</h1>
14<p>There are a number of packages that allow creation of a user interface
15for your Python code, each of which has its own merits:</p>
18	<li> The Carbon package gives low-level access to the old Macintosh toolbox
19	calls for windows, events, dialogs and more. The <tt>FrameWork</tt> module
20	wraps these in a minimal framework. For documentation see the Macintosh
21	Library section of the <a href="doc/index.html">Python Language and runtime 
22	documentation</a> and the Human Interface Toolbox section of 
23	<a href="help:openbook=Carbon">Apple's Carbon Documentation</a>. 
24	This solution is compatible with MacPython-OS9.</li>
25	<li> The <tt>W</tt> framework is built on top of this, and easier to use.
26	The MacPython IDE uses W. Some documentation is available on 
27	<a href="">Corran Webster's website</a>.
28	Compatible with MacPython-OS9.</li>
31<p>For new work, however, one of the following packages may be better suited.
32They may be available out of the box in this distribution, otherwise you
33can install them through the <a href="packman.html">Package Manager</a>:</p>
36	<li> <a href="">PyObjC</a> allows complete access to Cocoa. 
37	In technical terms it is a
38	bidirectional bridge between Python and Objectve-C, similar to Apple's Java
39	bridge. Probably the best choice for Mac OS X-only applications, but at the
40	time of this writing PyObjC is still in beta.</li>
42	<li> <a href="">wxPython</a> gives Python programs
43	access to the wxWindows  GUI toolkit. Many people consider this
44	the best open source cross-platform GUI solution available today.</li>
46	<li> Tkinter is the oldest cross-platform GUI toolkit for Python, bridging Python
47	to Tcl/Tk. If you install AquaTk it creates a native user interface on Mac OS X.
48	Documented in the Library section, Tkinter subsection of the 
49	<a href="doc/index.html">Python Language and runtime documentation</a>. Tkinter
50	is not available for MacPython-OS9.</li>