Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/fuzzyman/webapps/www.ironpython.info/includes/MagicWord.php on line 670

Warning: Invalid argument supplied for foreach() in /home/fuzzyman/webapps/www.ironpython.info/includes/MagicWord.php on line 671

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/fuzzyman/webapps/www.ironpython.info/includes/MagicWord.php on line 675

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/fuzzyman/webapps/www.ironpython.info/includes/MagicWord.php on line 670

Warning: Invalid argument supplied for foreach() in /home/fuzzyman/webapps/www.ironpython.info/includes/MagicWord.php on line 671

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/fuzzyman/webapps/www.ironpython.info/includes/MagicWord.php on line 675

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/fuzzyman/webapps/www.ironpython.info/includes/MagicWord.php on line 670

Warning: Invalid argument supplied for foreach() in /home/fuzzyman/webapps/www.ironpython.info/includes/MagicWord.php on line 671

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/fuzzyman/webapps/www.ironpython.info/includes/MagicWord.php on line 675

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/fuzzyman/webapps/www.ironpython.info/includes/MagicWord.php on line 670

Warning: Invalid argument supplied for foreach() in /home/fuzzyman/webapps/www.ironpython.info/includes/MagicWord.php on line 671

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/fuzzyman/webapps/www.ironpython.info/includes/MagicWord.php on line 675
Interactive Interpreter - IronPython Cookbook

Interactive Interpreter

From IronPython Cookbook

(Updated so it works with Mono/Unix)
Line 3: Line 3:
Both Python and IronPython can be used in interactive interpreter mode. This makes a great calculator, but is also a really good way of trying out language features or experimenting with libraries. You can also perform simple scripting tasks like inspecting files or databases.
Both Python and IronPython can be used in interactive interpreter mode. This makes a great calculator, but is also a really good way of trying out language features or experimenting with libraries. You can also perform simple scripting tasks like inspecting files or databases.
-
To launch the interactive interpreter, run '''ipy.exe''' from the command line.   
+
To launch the interactive interpreter, run '''ipy''' from the command line.   
Individual commands, or blocks of code, can be typed here and are executed immediately.  The results are displayed in the console window.  You can access the last result through the magic variable '_'.
Individual commands, or blocks of code, can be typed here and are executed immediately.  The results are displayed in the console window.  You can access the last result through the magic variable '_'.
-
'''ipy.exe''' comes in the IronPython zipfile, which also has a tutorial to help you get started.
+
'''ipy''' (ipy.exe on Windows, and ipy on Unix) comes in the IronPython zipfile, which also has a tutorial to help you get started.
To enable syntax highlighting and tab completion in the interpreter, start '''ipy''' with the following arguments:
To enable syntax highlighting and tab completion in the interpreter, start '''ipy''' with the following arguments:

Revision as of 17:48, 3 June 2007

TOOLBOX
LANGUAGES