To run JythonMusic programs from the terminal window (Windows/Mac/Linux):
Use your favorite editor to edit your program. Then,
Windows:
- Click on the Windows Start button.
- Type “cmd” (without the quotes) and hit Return. This will open an MS-DOS window, as shown below.
- Change directory to your jythonMusic folder (e.g., type “cd DesktopjythonMusic” – or wherever your jythonMusic folder is stored).
- Type “jython -i filename.py“, where “filename.py” is the name of one of your programs. This will run the program and leave you inside the jython interpreter.
- To exit the jython interpreter, type “exit()“.
Mac:
- Click on the Spotlight search icon (top right).
- Type “Terminal” (without the quotes) and hit Return. This will open a Terminal window, as shown below.
- Change directory to your jythonMusic folder (e.g., type “cd Desktop/jythonMusic” – or wherever your jythonMusic folder is stored).
- Type “sh jython.sh -i filename.py“, where “filename.py” is the name of one of your programs. This will run the program and leave you inside the jython interpreter.
- To exit the jython interpreter, type “exit()“.
Linux:
- Open a shell window and follow the Mac steps 3, 4, and 5 above.