From 8a0b5665c62f35476d4a01daba4ade95d3ce3810 Mon Sep 17 00:00:00 2001
From: Jack Jansen This volume of documentation is rather big (17 Megabytes) and contains
+a tutorial, full description of the Python library (all the modules
+and packages included), formal description of the language and more. You can view it online, where
+you can also download PDFs for printing, or you can download and install it
+through the Package Manager for viewing and
+searching via Apple Help Viewer. The application PythonLauncher will start a Python interpreter
+ when you drop a Python source file onto it, any file with a .py
+ or .pyw extension. If you set PythonLauncher as the default
+ application to open a file
+(
+tell me more) this also works when you double click a Python script. PythonLauncher has preferences per filetype for selecting
+ the interpreter to use, and how to launch it: in a Terminal window
+ or not, etc. Holding the Option key while launching your script will
+ bring up a window that allows changing these settings for a single
+ run. Choose a topic, or enter keywords into the search field: Python is a programming language. MacPython is a package containing
+that programming language plus Mac-specific tools and extensions.
+
+ The Python programming language is available for many hardware
+platforms, and most general documentation is Unix- or Windows-centered. Keep
+this in mind when reading the rest of this help, or information on the web.
+ The Python website, www.python.org,
+has a Beginners Guide section including an
+executive summary on
+the language and a
+comparison of Python
+to other languages.Python Language and runtime documentation
+
+Running Python scripts from the Finder
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/index.html b/Mac/OSXResources/app/Resources/English.lproj/Documentation/index.html
new file mode 100644
index 000000000000..dc6d5f32b57e
--- /dev/null
+++ b/Mac/OSXResources/app/Resources/English.lproj/Documentation/index.html
@@ -0,0 +1,44 @@
+
+
+
+
+ MacPython Help
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/intro.html b/Mac/OSXResources/app/Resources/English.lproj/Documentation/intro.html
new file mode 100644
index 000000000000..18c29217268b
--- /dev/null
+++ b/Mac/OSXResources/app/Resources/English.lproj/Documentation/intro.html
@@ -0,0 +1,76 @@
+
+
+
+
+ What is MacPython?
+
+
+
+
+
+
+
+
+
+
+
+The Python Language
+
MacPython contains a complete unix interpreter so +if you are familiar with Python on unix you should feel right at home.
+ +The MacPython Integrated Development Environment (IDE) allows +easy editing, running and debugging of scripts. Read the +Introduction +to the IDE to whet your appetite.
+ +MacPython comes with lots of modules that allow access to +MacOS-specific technology, such as Carbon, Quicktime and AppleScript. +See the Macintosh +Modules section of the +Python Language and runtime documentation, +but please keep in mind that some information there still pertains to +Mac OS 9. + +Full access to the Cocoa APIs +and tools such as Interface Builder is available separately through the +Package Manager.
+ +The Package Manager also gives you access to extension +packages for cross-platform GUI development (Tkinter, wxPython, PyOpenGL), +image processing (PIL), scientific +computing (Numeric) and much more. PyObjC deserves a special mention: it allows +transparent access to Cocoa and Interface Builder, similar to what Java provides, +thereby making Python a first class citizen in the Mac OS X developer world.
+ +Python scripts can be saved as applets, semi-standalone applications +that work just like a normal application. Additionally you can even create +true standalone application that have everything embedded and can be +shipped to anyone, without the need to install Python. You do not +need to install the Apple Developer Tools for this.
+ + diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/macpython_ide_tutorial/IDE.gif b/Mac/OSXResources/app/Resources/English.lproj/Documentation/macpython_ide_tutorial/IDE.gif new file mode 100644 index 0000000000000000000000000000000000000000..da9325d02c03cf8294169a26071b7d2c3b0eed65 GIT binary patch literal 10249 zc-j?~c{G&&7so%(GxN+mvzW!!*vC>PDWeclhLELYNR|>q^-b${RQjUmnXzvfk|fm# zMX5&nqI!@lsV1q=HnbsqzoU>se*Nw}=iYzb=iEQ;dB4wVnU9yFQzQm3@B@IRrly9y zj@P%_E0xNgo}RmR?{>6&ym|BH!0C|M20%-z&DO
zRI1mnUuVRfU1L)jxYV_3{p{f{-;SkcFvuhhIDh5*^`5hB>fSG22DwM2&ELO&zqdjD
zxY6QGN87iL|K5%(e^7TXeLMd0Ve^g3qUVa%SI-QJk`pd0Ok1XZ>h^`2xQKQ5m2OiV
z&5|gm-tHM{wff&ddZ=yUd^6)ued=TBe(&zRP+jl%(%19*_wS@Fk>@M!6}#^{l6!b;
zcoe^MwY|Pq_2OwsaB_2lvPOO~I4G#vDrpI`q@xsn`lx51kFAKBGot=prn~#hnKNUf
z This document gives a very basic introduction to the
+ MacPython Integrated Development Environment on Mac OS. It was
+ written specifically for MacPython 2.3 on Mac OS X, but most of
+ it is applicable to MacPython-OS9 too. It is based on
+ "One
+ Day of IDLE Toying" by Danny Yoo, which you should read if
+ you want to use the cross-platform IDLE Python development
+ environment. Ok, let's assume that we've already installed Python. (If not, we can
+visit: http://www.cwi.nl/~jack/macpython.html
+or http://python.org
+and download the most recent Python interpreter. Get the Mac OSX binary
+installer.) The first thing we'd like to do is actually start running it!
+We can do this by opening up the IDE, which should be in Applications
+under the newly-created MacPython program folder: The IDE starts up and shows an interactive window: If the window does not show up (because you have run the IDE before
+and closed it: it remembers that between runs) open it with the Windows->Python Interactive
+menu entry.
+
+ This is the interactive window to the IDE, it allows us to enter
+commands directly into Python, and as soon as we enter a command,
+Python will execute it and spit out its result back to us. We'll be
+using this interactive window a lot when we're exploring Python: it's
+very nice because we get back our results immediately. If it helps,
+we can think of it as a very powerful calculator. Let's try something now! As per tradition, let's get Python to say
+the immortal words, "Hello World". Those '>>>' signs act as a prompt
+for us: Python is ready to read in a new command by giving us that
+visual cue. Also, we notice that as we enter commands, Python will
+give us its output immediately.
+ Ok, this seems pretty simple enough. Let's try a few more
+commands. If we look below: we'll see the result of running a few more commands. Don't worry
+too much about knowing the exact rules for making programs yet: the
+idea is that we can experiment with Python by typing in commands. If
+things don't work, then we can correct the mistake, and try it
+again. If you got to this point, you now know enough to start playing
+around with Python! Crack open one of the tutorials from the Python For Beginners web
+page, and start exploring with the interpreter. No time limit here. *grin* Now that we've paddled long enough, we might be asking: ok, this is
+neat, but if we close down Python and start it up again, how do we get
+the computer to remember what we typed? The solution is a little subtle: we can't directly save what's on
+the interpreter window, because it will include both our commands and
+the system's responses. What we'd like is to make a prepared file,
+with just our own commands, and to be able to save that file as a
+document. When we're in the mood, we can later open that file and
+"run" Python over it, saving us the time of retyping the whole
+thing over again. Let's try this. First, let's start with a clean slate by opening
+up a new window. Here's the result of that menu command: We notice that there's nothing in this new window. What this means
+is that this file is purely for our commands: Python won't interject
+with its own responses as we enter the program, that is, not until we
+tell it to. This is called an edit window, and it is very similar
+to edit windows in other editors such as TextEdit or BBEdit. What we wanted to do before was save some of the stuff we had
+tried out on the interpreter window. Let's do that by typing (or
+copy/pasting) those commands into our Program window. Ok, we're done with copying and pasting.
+One big thing to notice
+is that we're careful to get rid of the ">>>"
+prompts because there's not really part of our program. The
+interpreter uses them just to tell us that we're in the interpreter,
+but now that we're editing in a separate file, we can remove the
+artifacts that the interpreter introduces.
+I have added
+an extra empty print statement so our output ends with a newline.
+ Let's save the file now. The Save command is located under the File menu:
+ Now that we've saved the program, how do we run the program? Use the
+Run All button at the top of the editing window, or the equivalent
+menu command Python->Run Window. The output will appear in a new
+window called Output Window. By the way, one thing to notice is that I made a typo: I didn't
+quite copy exactly what I had entered in the interpreter window
+before. Does this affect things? Ooops. Here is an example of what Python calls a "syntax error".
+Python sees that we made a typo, and warns us to take a much closer
+look at our program. The designers of Python feel that having the
+system point out the error is better than trying to guess at what the
+programmer meant. Press the Edit button and you will be brought to
+the trouble spot. Python is often perceptive enough to direct us toward the problem,
+and in this case, it's telling us that we forgot to put something at
+the end of this line. In this case, we need to add an additional
+quotation mark. Let's add that in now. Other errors, which usually occur later, when your program has
+already done something, result in a different dialog that allows you
+to look at variables and such in addition to only showing you where
+the error occurred. Ok, let's say that we fixed that silly typo. Let's try to run the
+program again. This gives us a new window, the Output window, showing
+the output of our program: As we play with Python, we'll find ourselves "switching modes"
+between the Interpreter window and the Program window. However,
+if we try anything more complicated than two or three lines it
+is often a good idea to work in an edit window, and align
+your edit and output window such that you can see them at the same time. This is pretty much all we need to know about the MacPython IDE to actually do
+interesting things. There is a lot more to the IDE, here is a quick
+breakdown of things to see and explore:T(9JS
z0N7RzA`Gq&_;Jf1cK?0nvHI+Y!saa>)yTKF{2b~=k=@cB&Lx5P;!3(4O!ePKv_%K2
zrUwb}l6<+n!$9__v;SV~Fe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