From: Jack Jansen Date: Wed, 18 Jun 2003 22:10:27 +0000 (+0000) Subject: - Added a "community" section. X-Git-Tag: v2.3c1~377 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0b1b5adaee0221401da75523d2fe32ed469d17ae;p=python - Added a "community" section. - Cleaned up the 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 0000000000..f4d200300a --- /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 9c0e192ef3..a8877ba885 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 @@
- +

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 e715de4aef..252c78c32f 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 @@ for your Python code, each of which has its own merits:

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 @@ can install them through the Package Manager:

    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 849548b5cf..34e1042e5b 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 @@ diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/intro.html b/Mac/OSXResources/app/Resources/English.lproj/Documentation/intro.html index 18c2921726..516e6a9ab1 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 @@
    - +

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

    @@ -30,11 +30,16 @@
  • 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 @@ 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 +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 cf515292f0..a169f5e203 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 @@

    - +

    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 @@ 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:

    +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 @@ 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 +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 @@ 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 @@ -97,11 +99,11 @@ 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 @@ -114,7 +116,7 @@ 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 @@ -129,22 +131,22 @@ 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: -

    +

    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 @@ 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



    @@ -198,7 +200,7 @@ breakdown of things to see and explore:

    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 @@ breakdown of things to see and explore:

    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 7eef2573f1..0767c48943 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 @@ diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/scripting.html b/Mac/OSXResources/app/Resources/English.lproj/Documentation/scripting.html index 58b1fe263b..16321cb28e 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 @@ 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

    +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 6c214e7bba..56f564645a 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 @@
    - +

    The Python Package Manager helps you installing additional @@ -35,7 +35,7 @@ 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 @@ 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 @@ 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