Hi, I've installed the "jdk1.1" and "jython" packages from Woody on my system and am trying to use jython interactively.
It's fine (albeit *slow*) when running a source file non-interactively: peregrin:~/Learn> cat sample.py def spam(): print 'spam' spam() peregrin:~/Learn> jython sample.py spam But when I try do this interactively, I first of all can't use tabs for indenting, but more importantly: peregrin:~/Learn> jython Jython 2.1 on java1.1.8 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> def spam(): ... print 'spam' ... Traceback (innermost last): (no code object) at line 0 File "<console>", line 3 null ^ SyntaxError: invalid syntax >>> Anybody have an idea what this is about? I'm not even sure I understand this error message. Clearly I didn't type "null" -- it would seem to be complaining about getting an empty line at the end of the function definition -- but that's how you end a def in python (and I typed exactly the same thing into my C Python interpreter and got the expected result -- no matter whether I use tabs or spaces). It *is* weird that Jython doesn't let me type a tab to indent this function (I had to type 4 spaces instead) -- but it really shouldn't matter. No doubt the slowness is due to the lack of JIT as it says (I am using Java 1.1 intentionally, because I want Jython primarily to write applets). Thanks for any ideas, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com