]> git.saurik.com Git - wxWidgets.git/blame - wxPython/docs/PyManual.txt
Made more useable from the command-line, since that is its primary purpose.
[wxWidgets.git] / wxPython / docs / PyManual.txt
CommitLineData
1fded56b
RD
1===============
2 The Py Manual
3===============
4
5-------------------------
6 Py - Served Fresh Daily
7-------------------------
8
9:Author: Patrick K. O'Brien
10:Contact: pobrien@orbtech.com
11:Organization: Orbtech_
12:Date: $Date$
13:Revision: $Revision$
14
15.. _Orbtech: http://www.orbtech.com/
16
17.. contents::
18
19
20Introduction
21============
22
23This document will show you how to use the Py programs and the Py
24library of Python source code modules. Py is the new name for the
25project that began as PyCrust. Py is officially part of wxPython_,
26and includes PyCrust, so PyCrust is no longer distributed separately.
27
28.. _wxPython: http://www.wxpython.org/
29
30
31Developer Reference
32===================
33
34Source code documentation for developers is available at:
35
36http://www.orbtech.com/www/wx/epydoc/public/wx.py-module.html
37
38
39What is Py?
40===========
41
42Besides being `a delicious dessert`_, Py is the name for a collection
43of whimsically-named Python programs and modules that began as the
44PyCrust project. So Py is really several things: a set of standalone
45programs, including the original PyCrust program, a library of Python
46source code modules that can be used in your own programs, a set of
47decorator classes that enhance the wxPython class library, and as many
48examples of bad "pie" puns as I can come up with. (If you're going to
49do something, you might as well do it all the way, right?) Py uses
50Python and wxPython, so it works equally well on Windows, Linux and
51Mac OS X.
52
53.. _a delicious dessert: http://www.wikipedia.org/wiki/Pie
54
55
56PyCrust is dead! Long live Py!
57==============================
58
59This project began with a program I created called PyCrust - an
60interactive, graphical Python shell, developed using the wxPython GUI
61toolkit. For about two years, PyCrust was hosted on SourceForge_.
62Shortly after I created PyCrust, the wxPython folks started including
63it in their distribution. As the PyCrust project grew, it reached a
64point where I thought the original PyCrust name was too confining. I
65was using the PyCrust code base to develop programs that weren't just
66Python shells any more.
67
68Around that same time, the wxPython folks asked me if I'd be willing
69to move all my wxPython-related projects into the `wxPython CVS
90805926 70repository`_, and become part of the wxPython_/wxWidgets_ developer team.
1fded56b
RD
71I decided the time was right to restructure the PyCrust project.
72During the move, the PyCrust package was renamed to "py" (lowercase
73"p") and the collection of programs and modules as a whole became
74known as "Py" (with a capital "P").
75
90805926 76.. _wxPython CVS repository: http://cvs.wxWidgets.org
1fded56b 77.. _SourceForge: http://www.sf.net/projects/pycrust/
90805926 78.. _wxWidgets: http://www.wxWidgets.org/
1fded56b
RD
79
80The original goal of PyCrust was to be the best interactive, graphical
81Python shell (of course, I claimed it was the "flakiest" Python
82shell). And that was all I wanted it to be. But little by little I
83found myself developing a wider variety of tools for wxPython
84applications. Eventually I'll create a debugger (PySlice, perhaps)
85and whatever else is needed to one day become a complete wxPython
86application development environment (PyFactory?). In the mean time,
87PyCrust is still the flakiest Python shell, and the other Py programs
88are equally tasty.
89
90At this point, Py has standalone programs that include Python code
91editors (PyAlaCarte and PyAlaMode), interactive Python shells (PyCrust
92and PyShell), and a runtime wrapper (PyWrap). The runtime wrapper
93utility provides you with runtime introspection capabilities for your
94wxPython programs without having to include PyCrust or PyShell in your
95program, and without having to alter one line of your source code.
96
97Py also contains a collection of modules that you can use in your own
98wxPython applications to provide similar services, either for your own
99use during development, or as an interface for users of your programs.
100These modules are the same ones used by all the Py programs. In
101addition, Py contains a set of decorator classes that enhance the
102wxPython class library, by dynamically attaching docstrings and call
103signatures at runtime.
104
105
106Py standalone programs
107======================
108
109These are the standalone applications in the Py collection:
110
111* PyAlaCarte
112* PyAlaMode
113* PyCrust
114* PyFilling
115* PyShell
116* PyWrap
117
118
119PyAlaCarte
120==========
121
122PyAlaCarte is a Python source code editor. It is designed to have a
123simple, single-file interface. As a standalone application, it is
124good for simple, short editing tasks. But it is really meant to be
125more of an example of how to embed the Py editor into a wxPython
126application.
127
128
129PyAlaMode
130=========
131
132PyAlaMode is a Python source code editor.
133
134
135PyCrust
136=======
137
138PyCrust is an interactive, Python shell. But it's more than just a
139shell. It includes a tabbed notebook containing a namespace tree
140(PyFilling), and several other things.
141
142
143PyFilling
144=========
145
146PyFilling is a namespace viewer. It isn't really useful as a
147standalone program, but it does illustrate how to make use of the
148underlying ``filling`` module.
149
150
151PyShell
152=======
153
154PyShell is an interactive, Python shell. It shares the same base code
155as PyCrust, but doesn't have any of the extra features that appear in
156the PyCrust notebook interface.
157
90805926 158.. figure:: screenshots/PyShell.png
1fded56b 159
90805926 160 PyShell running on Mandrake Linux.
1fded56b
RD
161
162
163PyWrap
164======
165
166PyWrap is a runtime utility that lets you run an existing wxPython
167program with a PyCrust frame at the same time. Inside the PyCrust
168shell namespace, the local variable ``app`` is assigned to your
169application instance. In this way you can introspect your entire
170application within the PyCrust shell, as well as the PyFilling
171namespace viewer. And through the use of the Py decorator classes,
172PyCrust can display wxPython function and method signatures as well as
173docstrings for the entire wxPython library.
174
175
176Py modules
177==========
178
179Py was designed to be modular. That means graphical code is kept
180separate from non-graphical code, and many of the Py modules can be
181used by other programs. Likewise, other programs can supply some of
182the modules needed by Py. For example, you could supply a customized
183interpreter module and plug it in to the PyCrust standalone
184application. As long as it supports the minimum functionality
185required, PyCrust will work just as well with your interpreter as with
186its default interpreter.
187
188
189Decorator classes
190=================
191
192Py contains a set of decorator classes that enhance the wxPython class
193library, by dynamically attaching docstrings and call signatures at
194runtime.
195
196
197Projects using Py
198=================
199
200* `Conflict Solver`_
201* Gnumed_
202* PyGist
203* PythonCard_
204* RPy_
205* SciPy_
206* Sim42_
207* wxGasp_
208
209.. _Conflict Solver: http://conflictsolver.sourceforge.net/
210.. _Gnumed: http://www.gnumed.org/
211.. _PythonCard: http://www.pythoncard.org/
212.. _RPy: http://rpy.sourceforge.net/
213.. _SciPy: http://www.scipy.org/
214.. _Sim42: http://www.sim42.org/
215.. _wxGasp: http://linus.yorktown.arlington.k12.va.us/CS/APCSC/student_sites/David_Mayo/wxGasp
216
217
218History of changes
219==================
220
221This section lists all the changes that have been made to the Py
222programs and modules, since the beginning.
223
8eda5e35 224.. include:: ../wx/py/CHANGES.txt
1fded56b 225