Datasheet
14
CHAPTER 1 Discovering ironPython
Let’s say you have no idea of what you want to find. Console help provides you with a list of words
you can type to get general help. These terms are:
Modules
Keywords
Topics
Type any of these terms and press Enter. You’ll see a list of additional words you can type, as shown
in Figure 1-6 for modules. Using this technique, you can drill down into help and locate anything you
want. In fact, it’s a good idea to spend some time in help just to see what’s available. Even advanced
developers can benefit from this approach — I personally follow this approach when I have time to
increase my level of knowledge about all of the languages I use.
IronPython will constantly refer you to the online help for Python. So
you might as well check it out now. You’ll find a good Python tutorial at
http://docs.python.org/tutorial/. While you’re at it, there’s also a good
IronPython-specific tutorial that comes with your installation. Simply choose
Start Programs IronPython 2.6 IronPython Tutorial. Although these
sources of help are useful, you’ll get a much better start working through the
examples in the book.
You might know about the topic you want to find. For example, you might know that you want
to print something to screen, but you don’t quite know how to use print. In this case, type
help(‘print‘) and press Enter. Figure 1-7 shows the results. You see complete documentation
about the
print keyword.
Understanding the IPY.EXE Command Line Syntax
When you open a console window, what you’re actually doing is executing IPY.EXE, which is
the IronPython interpreter. You don’t have to open a console window to use IPY.EXE. In fact,
you normally won’t. It’s possible to execute IronPython applications directly at the command
line. The following sections discuss IPY.EXE in more detail.
Adding IPY.EXE to the Windows Environment
Before you can use IPY.EXE effectively, you need to add it to the Windows path statement. The
following steps provide a brief procedure.
1. Open the Advanced tab of the Computer (or My Computer) applet.
2. Click Environment Variables. You’ll see an Environment Variables dialog box.
3. Highlight Path in the System Variables list. Click Edit. You’ll see the Edit Environment
Variable dialog box.
548592c01.indd 14 2/24/10 12:47:12 PM