5 Jul 15:51
(no code object) at line 0 with ScriptableThinlet and Jython
geraldo_ls <geraldo_ls <at> click21.com.br>
2004-07-05 13:51:48 GMT
2004-07-05 13:51:48 GMT
Hi,
I'm trying to use ScriptableThinlet with Jython.
I'm getting the following error:
SyntaxError: invalid syntax
: Traceback (innermost last):
(no code object) at line 0
File "<string>", line 1
x=1
^
SyntaxError: invalid syntax
I've copied jython.jar to \lib directory .
Created CalculatorJython.xml with minimalist script (x=1)
Created run-calculator-python.bat using run-calculator-groovy.bat
I've played with line end characters without success (lf, cr+lf)
Any thoughts ?
Geraldo Lopes de Souza
CalculatorJython.xml
<panel>
<textfield name="number1" columns="4" />
<label text="+" />
<textfield name="number2" columns="4" />
<button text="=">
<script method="action">
x=1
</script>
</button>
<textfield name="result" editable="false" />
</panel>
run-calculator-python.bat
--------------------------
@echo off
if "%OS%"=="Windows_NT" @setlocal
set HOME=%~dp0..
set LOCALCLASSPATH=%LOCALCLASSPATH%;%HOME%\classes
set LOCALCLASSPATH=%LOCALCLASSPATH%;%HOME%\..\thinlet\lib\thinlet.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%HOME%\lib\bsf-2.3.0rc1.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%HOME%\lib\asm-1.4.1.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%HOME%\lib\asm-util-1.4.1.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%HOME%\lib\jython.jar
echo Use classpath: %LOCALCLASSPATH%
%JAVA_HOME%/bin/java classpath %LOCALCLASSPATH%
thinlet.script.ScriptableThinlet -language jython -file
%HOME%\src\demo\script\calculatorJython.xml
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/thinlet/
<*> To unsubscribe from this group, send an email to:
thinlet-unsubscribe <at> yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
RSS Feed