JPython Syntax errors
raoval at auto-trol.com
raoval at auto-trol.com
Thu Sep 7 11:36:04 EDT 2000
I am new to JPython. I am trying to write a simple JPython script and
want to call it from my Java class. The following is my script program
(file name is Fibonacci.py):
import java
class Fibonacci:
def Multiply(self, num1, num2):
"@sig public int Multiply(int num1, int num2)"
self.result = num1*num2
return self.result
When I try to compile this using JPythonc bat file that came with the
JPython installer, I am getting the following error:
at line: self.result = num1*num2
Syntax error: inconsistent dedent
If I comment out "@sig public int Multiply(int num1, int num2)" line,
it compiles fine, but I can't access Multiply function from my java
class!
Any suggestions?
Thanks
Rao
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list