summaryrefslogtreecommitdiffstats
path: root/Mac/OSXResources/app/Resources/English.lproj/Documentation/gui.html
blob: e715de4aef1b042c8669d1ea5c9006dcdaaae1fc (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
55
<!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> 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.
</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> <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> 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.
</ul>
				
</body>
</html>