From f84d7e9ed21294f6001345ddc6b2a8c4894ab70c Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Tue, 19 May 2009 11:27:25 +0000 Subject: MACOSX * Remove junk documentation resources from the Python.app inside the framework (This is a left-over from the ancient Python IDE, which was removed before 2.5) * Ensure that the documentation is installed in a location where IDLE will see it --- Mac/BuildScript/build-installer.py | 9 +- Mac/Makefile.in | 10 +- .../English.lproj/Documentation/PackageManager.gif | Bin 6087 -> 0 bytes .../English.lproj/Documentation/community.html | 69 ------- .../English.lproj/Documentation/doc/index.html | 21 -- .../English.lproj/Documentation/finder.html | 36 ---- .../Resources/English.lproj/Documentation/gui.html | 54 ----- .../English.lproj/Documentation/ide/IDE.gif | Bin 10249 -> 0 bytes .../Documentation/ide/entering_in_new_window.gif | Bin 15578 -> 0 bytes .../Documentation/ide/hello_world.gif | Bin 15681 -> 0 bytes .../English.lproj/Documentation/ide/index.html | 222 --------------------- .../Documentation/ide/loading_ide.gif | Bin 50595 -> 0 bytes .../Documentation/ide/making_new_window.gif | Bin 25978 -> 0 bytes .../Documentation/ide/new_ide_window.gif | Bin 20606 -> 0 bytes .../Documentation/ide/new_window_made.gif | Bin 21808 -> 0 bytes .../Documentation/ide/output_window.gif | Bin 37660 -> 0 bytes .../Documentation/ide/saving_edited_file.gif | Bin 26559 -> 0 bytes .../Documentation/ide/simple_commands.gif | Bin 14134 -> 0 bytes .../Documentation/ide/syntax_error.gif | Bin 12850 -> 0 bytes .../English.lproj/Documentation/index.html | 51 ----- .../English.lproj/Documentation/intro.html | 76 ------- .../English.lproj/Documentation/packman.html | 64 ------ .../English.lproj/Documentation/python.gif | Bin 6389 -> 0 bytes .../English.lproj/Documentation/pythonsmall.gif | Bin 138 -> 0 bytes .../English.lproj/Documentation/scripting.html | 53 ----- .../English.lproj/Documentation/shell.html | 52 ----- 26 files changed, 5 insertions(+), 712 deletions(-) delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/PackageManager.gif delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/community.html delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/doc/index.html delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/finder.html delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/gui.html delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/ide/IDE.gif delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/ide/entering_in_new_window.gif delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/ide/hello_world.gif delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/ide/index.html delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/ide/loading_ide.gif delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/ide/making_new_window.gif delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/ide/new_ide_window.gif delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/ide/new_window_made.gif delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/ide/output_window.gif delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/ide/saving_edited_file.gif delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/ide/simple_commands.gif delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/ide/syntax_error.gif delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/index.html delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/intro.html delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/packman.html delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/python.gif delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/pythonsmall.gif delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/scripting.html delete mode 100644 Mac/Resources/app/Resources/English.lproj/Documentation/shell.html diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py index 974fe52..3cd9d2d 100755 --- a/Mac/BuildScript/build-installer.py +++ b/Mac/BuildScript/build-installer.py @@ -614,10 +614,9 @@ def buildPythonDocs(): runCommand('make update') runCommand('make html') os.chdir(curDir) - if not os.path.exists(docdir): - os.mkdir(docdir) - os.rename(os.path.join(buildDir, 'build', 'html'), - os.path.join(docdir, 'python-docs-html')) + if os.path.exists(docdir): + os.rmdir(docdir) + os.rename(os.path.join(buildDir, 'build', 'html'), docdir) def buildPython(): @@ -663,7 +662,7 @@ def buildPython(): runCommand("make") print "Running make frameworkinstall" - runCommand("make frameworkinstall DESTDIR=%s"%( + runCommand("make install DESTDIR=%s"%( shellQuote(rootDir))) print "Running make frameworkinstallextras" diff --git a/Mac/Makefile.in b/Mac/Makefile.in index f35009d..4d55e4b 100644 --- a/Mac/Makefile.in +++ b/Mac/Makefile.in @@ -38,12 +38,7 @@ STRIPFLAG=-s CPMAC=/Developer/Tools/CpMac APPTEMPLATE=$(srcdir)/Resources/app -APPSUBDIRS=MacOS Resources Resources/English.lproj \ - Resources/English.lproj/Documentation \ - Resources/English.lproj/Documentation/doc \ - Resources/English.lproj/Documentation/ide -DOCDIR=$(srcdir)/Resources/app/Resources/English.lproj/Documentation -DOCINDEX=$(DOCDIR)/"Documentation idx" +APPSUBDIRS=MacOS Resources compileall=$(srcdir)/../Lib/compileall.py installapps: install_Python install_PythonLauncher install_IDLE \ @@ -157,9 +152,6 @@ install_PythonLauncher: cd PythonLauncher && make install DESTDIR=$(DESTDIR) install_Python: - @if test ! -f $(DOCINDEX); then \ - echo WARNING: you should run Apple Help Indexing Tool on $(DOCDIR); \ - fi @for i in "$(PYTHONAPPSDIR)" "$(APPINSTALLDIR)" "$(APPINSTALLDIR)/Contents"; do \ if test ! -d "$(DESTDIR)$$i"; then \ echo "Creating directory $(DESTDIR)$$i"; \ diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/PackageManager.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/PackageManager.gif deleted file mode 100644 index 2b93dc8..0000000 Binary files a/Mac/Resources/app/Resources/English.lproj/Documentation/PackageManager.gif and /dev/null differ diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/community.html b/Mac/Resources/app/Resources/English.lproj/Documentation/community.html deleted file mode 100644 index 140a38b..0000000 --- a/Mac/Resources/app/Resources/English.lproj/Documentation/community.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - What is MacPython? - - - - - - - - - - -
- - -

MacPython Community

-
-
- -

Web Sites

- -

The MacPython homepage, -www.cwi.nl/~jack/macpython.html -is where you can find installers, documents, links to useful packages and more. -And, of course, -www.python.org has a much larger collection -of material on Python that is not Mac-specific.

- -

News groups and Mailing lists

- -

There are a lot of mailing lists on Python. Some of the more interesting -ones are:

- - -

In addition there are Python Special Interest Group -mailing lists on a wide variety of topics such as image processing, numerical algorithms -and more.

- -

More

- -

An index of conferences, Wiki's, bookshops and more can be found at the -Community section of the Python website.

- -

If you find a bug you are kindly requested to report it, preferrably through the -automatic bug tracker at www.python.org

- -

If you want to become an active developer you are very welcome! Join the -pythonmac-sig mailing list mentioned above, and read the -Developer section on the Python website.

- - - diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/doc/index.html b/Mac/Resources/app/Resources/English.lproj/Documentation/doc/index.html deleted file mode 100644 index 2ce7357..0000000 --- a/Mac/Resources/app/Resources/English.lproj/Documentation/doc/index.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - Python Language Documentation - - - -

Python Language and runtime documentation

- -

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.

- - diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/finder.html b/Mac/Resources/app/Resources/English.lproj/Documentation/finder.html deleted file mode 100644 index a8877ba..0000000 --- a/Mac/Resources/app/Resources/English.lproj/Documentation/finder.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - Python and the Finder - - - - - -

Running Python scripts from the Finder

- - - - - -
- - -

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.

-
-
- - diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/gui.html b/Mac/Resources/app/Resources/English.lproj/Documentation/gui.html deleted file mode 100644 index 252c78c..0000000 --- a/Mac/Resources/app/Resources/English.lproj/Documentation/gui.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - Creating a User Interface with MacPython - - - - - -

Creating a User Interface with MacPython

- -

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

- - - -

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 Package Manager:

- - - - - diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/IDE.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/IDE.gif deleted file mode 100644 index da9325d..0000000 Binary files a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/IDE.gif and /dev/null differ diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/entering_in_new_window.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/entering_in_new_window.gif deleted file mode 100644 index baa400e..0000000 Binary files a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/entering_in_new_window.gif and /dev/null differ diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/hello_world.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/hello_world.gif deleted file mode 100644 index c7390af..0000000 Binary files a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/hello_world.gif and /dev/null differ diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/index.html b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/index.html deleted file mode 100644 index a169f5e..0000000 --- a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/index.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - One Day of MacPython IDE Toying - - - - -

One Day of MacPython IDE Toying

- - - - - -
- - -

This document gives a very basic introduction to the - MacPython Integrated Development Environment (IDE) 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:

image of IDE icon

- -

- -

The IDE starts up and shows an interactive window:

-

image of new 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 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". image of hello world program

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:

- -

image of command window

- -

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 in -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.

- -

image of making new window

- -

Here's the result of that menu command:

- -

image of new window

- -

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 edit window.

-

image of entering commands

- -

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 they're 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:

-

image of saving file

- - -

- -

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?

- -

image of syntax error

- -

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 a -quotation mark at the end. 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 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:

-

image of output window

- -

- -

As we play with Python, we'll find ourselves "switching modes" -between the Interpreter window and the edit 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. 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:

- - - - diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/loading_ide.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/loading_ide.gif deleted file mode 100644 index e7cca3d..0000000 Binary files a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/loading_ide.gif and /dev/null differ diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/making_new_window.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/making_new_window.gif deleted file mode 100644 index d2022c8..0000000 Binary files a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/making_new_window.gif and /dev/null differ diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/new_ide_window.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/new_ide_window.gif deleted file mode 100644 index 7268a84..0000000 Binary files a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/new_ide_window.gif and /dev/null differ diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/new_window_made.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/new_window_made.gif deleted file mode 100644 index dd6cca3..0000000 Binary files a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/new_window_made.gif and /dev/null differ diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/output_window.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/output_window.gif deleted file mode 100644 index 568dcb5..0000000 Binary files a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/output_window.gif and /dev/null differ diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/saving_edited_file.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/saving_edited_file.gif deleted file mode 100644 index 6e5c926..0000000 Binary files a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/saving_edited_file.gif and /dev/null differ diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/simple_commands.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/simple_commands.gif deleted file mode 100644 index 1dba570..0000000 Binary files a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/simple_commands.gif and /dev/null differ diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/syntax_error.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/syntax_error.gif deleted file mode 100644 index 2e95b87..0000000 Binary files a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/syntax_error.gif and /dev/null differ diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/index.html b/Mac/Resources/app/Resources/English.lproj/Documentation/index.html deleted file mode 100644 index ef12c10..0000000 --- a/Mac/Resources/app/Resources/English.lproj/Documentation/index.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - MacPython Help - - - - - - - -

MacPython Help

- - - - - -
- - -

Choose a topic, or enter keywords into the search field:

- - -
-
- - - diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/intro.html b/Mac/Resources/app/Resources/English.lproj/Documentation/intro.html deleted file mode 100644 index f0ab371..0000000 --- a/Mac/Resources/app/Resources/English.lproj/Documentation/intro.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - What is MacPython? - - - - - -

What is MacPython?

- - - - - -
- - -

Python is a programming language. MacPython is a package containing -that programming language plus Mac-specific tools and extensions.

- -
-
- -

The Python Language

-

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. Or read the (rather longwinded) Python -Tutorial in the Python Language and runtime documentation.

- -

MacPython contains a complete unix interpreter so -if you are familiar with Python on unix you should feel right at home.

- -

MacPython additions

- -

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/Resources/app/Resources/English.lproj/Documentation/packman.html b/Mac/Resources/app/Resources/English.lproj/Documentation/packman.html deleted file mode 100644 index 355e0da..0000000 --- a/Mac/Resources/app/Resources/English.lproj/Documentation/packman.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - Python Package Manager - - - - - -

Installing additional Python Packages

- - - - - -
- - -

The Python Package Manager helps you installing additional - packages that enhance Python. It determines the exact MacOS version - and Python version you have and uses that information to download - a database that has packages that are test and tried on that - combination. In other words: if something is in your Package Manager - window but does not work you are free to blame the database maintainer.

- -

PackageManager then checks which of the packages you have installed - and which ones not. This should also work when you have installed packages - outside of PackageManager. - You can select packages and install them, and PackageManager will work - out the requirements and install these too.

- -

Often PackageManager will list a package in two flavors: binary - and source. Binary should always work, source will only work if - you have installed the Apple Developer Tools. PackageManager will warn - you about this, and also about other external dependencies.

- -

PackageManager is available as a separate application and also - as a function of the IDE, through the File->Package Manager menu - entry.

- -

Troubleshooting

- -

If package manager fails to open the database first check that you are - connected to the internet. If you are connected then the problem - could be that there is no database (yet?) for your version of Mac OS X. - You may be able to find an alternative - database that works for your system at - http://www.python.org/packman. - In the standalone Package Manager you can then open such an alternative database - with the File->Open URL... command, but you should realize that - you are now on untested ground.

- -

Another potential problem source is that you are behind a firewall. This version - of PackageManager uses the Unix method of setting a firewall: you need to set the - environment variable http_proxy to "http://proxyhost:port". - See Apple Technical - Q&A QA1067 for instructions.

- -
-
- - diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/python.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/python.gif deleted file mode 100644 index 3d4aa5d..0000000 Binary files a/Mac/Resources/app/Resources/English.lproj/Documentation/python.gif and /dev/null differ diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/pythonsmall.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/pythonsmall.gif deleted file mode 100644 index 440225e..0000000 Binary files a/Mac/Resources/app/Resources/English.lproj/Documentation/pythonsmall.gif and /dev/null differ diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/scripting.html b/Mac/Resources/app/Resources/English.lproj/Documentation/scripting.html deleted file mode 100644 index 16321cb..0000000 --- a/Mac/Resources/app/Resources/English.lproj/Documentation/scripting.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - Controlling other Applications from MacPython - - - - - -

Controlling other Applications from MacPython

- -

Python has a fairly complete implementation of the Open Scripting -Architecure (OSA, also commonly referred to as AppleScript), allowing -you to control scriptable applications from your Python program, -and with a fairly pythonic interface. This piece of -Python:

- -

-import Finder
-
-f = Finder.Finder()
-print f.get(f.window(1).name)
-
- -

is identical to the following piece of AppleScript:

- -

-tell application "Finder"
-	get name of window 1
-end tell
-
- -

To send AppleEvents to an application you must first create the Python -modules interfacing to the terminology of the application (what -Script Editor calls the "Dictionary"). Use the IDE menu command -File->Generate OSA Suite... for this. For more control run

- -
-pythonw .../Lib/plat-mac/gensuitemodule.py --help -
- -

from a terminal window.

- -

Creating a scriptable application in Python

- -You can also create a scriptable application in Python, but this is not -very well documented. For Carbon -applications you should look at the MiniAEFrame module. - - - diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/shell.html b/Mac/Resources/app/Resources/English.lproj/Documentation/shell.html deleted file mode 100644 index 56f5646..0000000 --- a/Mac/Resources/app/Resources/English.lproj/Documentation/shell.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - Python and the Unix Shell - - - - - -

Running Python scripts from the Unix Shell

- - - - - -
- - -

MacPython 2.3 installs a perfectly normal Unix commandline - python interpreter in /usr/local/bin/python. As of Mac OS X 10.2, however, - /usr/local/bin is not on the search path of your shell. Moreover, - Apple's python 2.2, which lives in /usr/bin is on your - search path, so this can lead to confusion.

- -

If you use tcsh you should add the following line - to the file .login in your home directory and restart Terminal: -
- setenv PATH /usr/local/bin:$PATH -

- -

If you use bash or zsh - you should add the following line - to the file .profile in your home directory and restart Terminal: -
- export PATH=/usr/local/bin:$PATH -

- -

GUI scripts

- -

Due to the way MacOS handles windowing applications you need to run - all scripts that use the window manager (be it through - Carbon, Cocoa, Tkinter, wxPython, PyOpenGL or anything else) with the - pythonw interpreter, also installed in /usr/local/bin.

- -

Running with python results in an inability to bring the - script to the front, or interacting with it.

-
-
- - -- cgit v0.12