summaryrefslogtreecommitdiffstats
path: root/Mac/OSXResources/app/Resources/English.lproj/Documentation/gui.html
blob: 252c78c32fd8143a17c790afa18b5d7c5f483624 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html lang="en">
<head>
	<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
	<title>Creating a User Interface with MacPython</title>
	<meta name="generator" content="BBEdit 6.5.3">
	<link rel="SHORTCUT ICON" href="pythonsmall.gif">
	<META NAME="AppleIcon" CONTENT="pythonsmall.gif">
</head>
<body>
<h1>Creating a User Interface with MacPython</h1>

<p>There are a number of packages that allow creation of a user interface
for your Python code, each of which has its own merits:</p>

<ul>
	<li> The Carbon package gives low-level access to the old Macintosh toolbox
	calls for windows, events, dialogs and more. The <tt>FrameWork</tt> module
	wraps these in a minimal framework. For documentation see the Macintosh
	Library section of the <a href="doc/index.html">Python Language and runtime 
	documentation</a> and the Human Interface Toolbox section of 
	<a href="help:openbook=Carbon">Apple's Carbon Documentation</a>. 
	This solution is compatible with MacPython-OS9.</li>
	<li> The <tt>W</tt> framework is built on top of this, and easier to use.
	The MacPython IDE uses W. Some documentation is available on 
	<a href="http://www.nevada.edu/~cwebster/Python/index.html">Corran Webster's website</a>.
	Compatible with MacPython-OS9.</li>
</ul>

<p>For new work, however, one of the following packages may be better suited.
They may be available out of the box in this distribution, otherwise you
can install them through the <a href="packman.html">Package Manager</a>:</p>

<ul>
	<li> <a href="http://pyobjc.sourceforge.net/">PyObjC</a> allows complete access to Cocoa. 
	In technical terms it is a
	bidirectional bridge between Python and Objectve-C, similar to Apple's Java
	bridge. Probably the best choice for Mac OS X-only applications, but at the
	time of this writing PyObjC is still in beta.</li>
	
	<li> <a href="http://wxpython.sourceforge.net/">wxPython</a> gives Python programs
	access to the wxWindows  GUI toolkit. Many people consider this
	the best open source cross-platform GUI solution available today.</li>
	
	<li> Tkinter is the oldest cross-platform GUI toolkit for Python, bridging Python
	to Tcl/Tk. If you install AquaTk it creates a native user interface on Mac OS X.
	Documented in the Library section, Tkinter subsection of the 
	<a href="doc/index.html">Python Language and runtime documentation</a>. Tkinter
	is not available for MacPython-OS9.</li>
</ul>
				
</body>
</html>