|
From: Jayson B. <js...@ci...> - 2001-04-10 23:44:30
|
hi all,
When trying to run a script inside of a java looping body, like so:
interpreter.set("x", new PyInteger(42));
while(infile.ready()) {
interpreter.exec(infile.readLine());
}
I get the following error with the following python code:
Exception in thread "main" Traceback (innermost last):
(no code object) at line 0
File "<string>", line 2
SyntaxError: invalid syntax
the file I'm reading from is as follows:
if x == 42:
x = x + 1;
running anything but an if statement works just fine.. all my python
books say that is the right syntax... any ideas?
Jayson Baird
js...@ci...
|