S
scott
I installed darwinports and did a "sudo port install jython"
-------------------------
scott$ which jython
/opt/local/bin/jython
-------------------------
Jython works in interactive mode as shown below:
-------------------------
pyprogs$ cd hotbits/
hotbits$ ls
flips50.py jythoninstall.py randomX randomflip.py
hotbits$ jython
Jython 2.2a0 on java1.4.2_05 (JIT: null).... print 'tails'
.... else:
.... print 'heads'
....
tails
--------------------------
Jython *doesn't* work if I save the above as a script and try to run it.
It refuses to run the script and simply starts up in interactive mode:
---------------------------
hotbits$ jython randomflip.py
Jython 2.2a0 on java1.4.2_05 (JIT: null)
---------------------------
Question:
How can I run scripts as expected (outside interactive mode)?
Thanks in advance.
-------------------------
scott$ which jython
/opt/local/bin/jython
-------------------------
Jython works in interactive mode as shown below:
-------------------------
pyprogs$ cd hotbits/
hotbits$ ls
flips50.py jythoninstall.py randomX randomflip.py
hotbits$ jython
Jython 2.2a0 on java1.4.2_05 (JIT: null).... print 'tails'
.... else:
.... print 'heads'
....
tails
--------------------------
Jython *doesn't* work if I save the above as a script and try to run it.
It refuses to run the script and simply starts up in interactive mode:
---------------------------
hotbits$ jython randomflip.py
Jython 2.2a0 on java1.4.2_05 (JIT: null)
---------------------------
Question:
How can I run scripts as expected (outside interactive mode)?
Thanks in advance.