|
|
||
Other ToolsThis section lists some additional tools which are popular ways to create, maintain and execute Python programs. While IDLE is suitable for many purposes, you may prefer an IDE with a different level of sophistication. Any PlatformThe Komodo Edit is an IDE that is considerably more sophisticated than IDLE. It is — in a way — too sophisticated for this book. Our focus is on the language, not high-powered IDE's. As with IDLE, this is a tool that runs everywhere, so you can move seamlessly from GNU/Linux to Wiundows to the Mac OS with a single, powerful tool. See www.komodo.com for more information on ordering and downloading. WindowsWindows programmers might want to use a tool like
Textpad. See www.textpad.com for information on
ordering and downloading. Be sure to also download the
To use Textpad, you have two setup steps. First, you'll need to add the Python document class. Second you'll need to tell Textpad about the Python tool.
The Python Document Class. You need to tell Textpad about the
Python document class. Use the Configure menu; the
New Document Class... menu item lets you add
Python documents to Textpad. Name your new
document class
The Python Tool. You'll want to add the Python interpreter as a
Textpad tool. Use the
Configure menu again, this time selecting the
Preferences... item. Scroll down the list of
preferences on the left and click on Tools. On
the right, you'll get a panel with the current set of tools and a
prominent Add button on the top right-hand
side. Click Add, and select
Program... from the menu that appears. You'll
get a dialog for locating a file; find the
You can check this by using Configure menu and Preferences... item again. Scroll down the list to find Tools. Click the + sign and open the list of tools. Click the Python tool and check the following:
You might also want to turn off the Sound Alert option; this will beep when a program finishes running. I find this makes things a little too noisy for most programs. MacintoshMacintosh programmers might want to use a tool like BBEdit. BBEdit can also run the programs, saving the output for you. See www.barebones.com for more information on BBEdit. To use BBEdit, you have two considerations when writing Python programs. You must be sure to decorate each Python file with the following
line: The second thing is to be sure you set the " chdir to Script's Folder " option when you use the the run... item in the #! ("shebang") menu. Without this, scripts are run in the root directory, not in the directory that contains your script file. |
||