From 0b1b5adaee0221401da75523d2fe32ed469d17ae Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Wed, 18 Jun 2003 22:10:27 +0000 Subject: [PATCH] - Added a "community" section. - Cleaned up the HTML. --- .../Documentation/community.html | 62 +++++++++++++++++++ .../English.lproj/Documentation/finder.html | 2 +- .../English.lproj/Documentation/gui.html | 11 ++-- .../English.lproj/Documentation/index.html | 7 ++- .../English.lproj/Documentation/intro.html | 6 +- .../macpython_ide_tutorial/index.html | 38 ++++++------ .../English.lproj/Documentation/packman.html | 6 +- .../Documentation/scripting.html | 10 +-- .../English.lproj/Documentation/shell.html | 5 +- 9 files changed, 108 insertions(+), 39 deletions(-) create mode 100644 Mac/OSXResources/app/Resources/English.lproj/Documentation/community.html diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/community.html b/Mac/OSXResources/app/Resources/English.lproj/Documentation/community.html new file mode 100644 index 00000000000..f4d200300ad --- /dev/null +++ b/Mac/OSXResources/app/Resources/English.lproj/Documentation/community.html @@ -0,0 +1,62 @@ + + + + + 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.

+ + + diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/finder.html b/Mac/OSXResources/app/Resources/English.lproj/Documentation/finder.html index 9c0e192ef38..a8877ba885f 100644 --- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/finder.html +++ b/Mac/OSXResources/app/Resources/English.lproj/Documentation/finder.html @@ -13,7 +13,7 @@

Running Python scripts from the Finder

- +

The application PythonLauncher will start a Python interpreter diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/gui.html b/Mac/OSXResources/app/Resources/English.lproj/Documentation/gui.html index e715de4aef1..252c78c32fd 100644 --- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/gui.html +++ b/Mac/OSXResources/app/Resources/English.lproj/Documentation/gui.html @@ -21,12 +21,11 @@

Creating a User Interface with MacPython

Library section of the Python Language and runtime documentation and the Human Interface Toolbox section of Apple's Carbon Documentation. - This solution is compatible with MacPython-OS9. - + This solution is compatible with MacPython-OS9.
  • The W framework is built on top of this, and easier to use. The MacPython IDE uses W. Some documentation is available on Corran Webster's website. - Compatible with MacPython-OS9. + Compatible with MacPython-OS9.
  • For new work, however, one of the following packages may be better suited. @@ -38,17 +37,17 @@

    Creating a User Interface with MacPython

    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. + time of this writing PyObjC is still in beta.
  • wxPython gives Python programs access to the wxWindows GUI toolkit. Many people consider this - the best open source cross-platform GUI solution available today. + the best open source cross-platform GUI solution available today.
  • 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 Python Language and runtime documentation. Tkinter - is not available for MacPython-OS9. + is not available for MacPython-OS9.
  • diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/index.html b/Mac/OSXResources/app/Resources/English.lproj/Documentation/index.html index 849548b5cf7..34e1042e5b8 100644 --- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/index.html +++ b/Mac/OSXResources/app/Resources/English.lproj/Documentation/index.html @@ -15,7 +15,7 @@

    MacPython Help

    diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/intro.html b/Mac/OSXResources/app/Resources/English.lproj/Documentation/intro.html index 18c29217268..516e6a9ab1e 100644 --- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/intro.html +++ b/Mac/OSXResources/app/Resources/English.lproj/Documentation/intro.html @@ -13,11 +13,11 @@

    What is MacPython?

    - +

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

    @@ -30,11 +30,16 @@

    MacPython Help

  • Running Python scripts from the Finder
  • Running Python scripts from the Unix Shell +
  • Creating a User Interface with MacPython +
  • Controlling other Applications from MacPython +
  • Installing additional functionality with the Package Manager
  • +
  • MacPython community +
  • @@ -35,7 +35,7 @@

    The Python Language

    executive summary on the language and a comparison of Python -to other languages. Or read the (rather longwinded) 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 diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/macpython_ide_tutorial/index.html b/Mac/OSXResources/app/Resources/English.lproj/Documentation/macpython_ide_tutorial/index.html index cf515292f09..a169f5e2030 100644 --- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/macpython_ide_tutorial/index.html +++ b/Mac/OSXResources/app/Resources/English.lproj/Documentation/macpython_ide_tutorial/index.html @@ -1,4 +1,6 @@ - + + One Day of MacPython IDE Toying @@ -9,7 +11,7 @@

    One Day of MacPython IDE Toying

    - +

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

    +that programming language plus Mac-specific tools and extensions.

    - +

    This document gives a very basic introduction to the @@ -34,16 +36,16 @@

    One Day of MacPython IDE Toying

    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:

    +src="loading_ide.gif" border=1 alt="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.

    +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, @@ -56,7 +58,7 @@

    One Day of MacPython IDE Toying

    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 +border=1 alt="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. @@ -67,7 +69,7 @@

    One Day of MacPython IDE Toying

    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 @@ -97,11 +99,11 @@

    One Day of MacPython IDE Toying

    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 @@ -114,7 +116,7 @@

    One Day of MacPython IDE Toying

    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 @@ -129,22 +131,22 @@

    One Day of MacPython IDE Toying



    -

    Let's save the file now. The Save command is located under the File menu: -

    +

    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 +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 @@ -168,7 +170,7 @@

    One Day of MacPython IDE Toying

    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



    @@ -198,7 +200,7 @@

    One Day of MacPython IDE Toying

    when it reaches this line so you can inspect things. The profiler is also nifty: it shows you where your program is spending its time. -
  • The module browser (Python->Module Browser) shows you all Python +
  • The module browser (Python->Module Browser) shows you all Python modules currently loaded. You can look at the contents of the module with Browse... and (for modules written in Python) at the source with Source...
  • @@ -211,7 +213,7 @@

    One Day of MacPython IDE Toying

    if you have installed it with the Package Manager, and the Apple Developer documentation. -
  • The File->Save as Applet menu command saves your script as a MacOSX +
  • The File->Save as Applet menu command saves your script as a MacOSX application. This allows you to create a script that you can drop files on, and much more. The IDE itself is such an applet, completely written in Python.
  • diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/packman.html b/Mac/OSXResources/app/Resources/English.lproj/Documentation/packman.html index 7eef2573f15..0767c489432 100644 --- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/packman.html +++ b/Mac/OSXResources/app/Resources/English.lproj/Documentation/packman.html @@ -13,7 +13,7 @@

    Installing additional Python Packages

    diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/scripting.html b/Mac/OSXResources/app/Resources/English.lproj/Documentation/scripting.html index 58b1fe263bc..16321cb28e0 100644 --- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/scripting.html +++ b/Mac/OSXResources/app/Resources/English.lproj/Documentation/scripting.html @@ -17,25 +17,25 @@

    Controlling other Applications from MacPython

    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

    +File->Generate OSA Suite... for this. For more control run

    pythonw .../Lib/plat-mac/gensuitemodule.py --help diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/shell.html b/Mac/OSXResources/app/Resources/English.lproj/Documentation/shell.html index 6c214e7bba3..56f564645a7 100644 --- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/shell.html +++ b/Mac/OSXResources/app/Resources/English.lproj/Documentation/shell.html @@ -13,7 +13,7 @@

    Running Python scripts from the Unix Shell

    - +

    The Python Package Manager helps you installing additional @@ -35,7 +35,7 @@

    Installing additional Python Packages

    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 + as a function of the IDE, through the File->Package Manager menu entry.

    Troubleshooting

    @@ -44,7 +44,7 @@

    Troubleshooting

    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. In the standalone Package Manager you can open an alternative database - with the File->Open URL... command, but you should realize that + with the File->Open URL... command, but you should realize that you are now on untested ground.

    - +

    MacPython 2.3 installs a perfectly normal Unix commandline @@ -26,13 +26,14 @@

    Running Python scripts from the Unix Shell

    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