Now that I have javascript working and talking to the emulator pod of my MSP430, I need to get jython working, as we will be writing our test scripts in python. I have downloaded and installed jython and gotten it to do the equivalent of "hello world". I modified the startup script I used to get javascript running so it should pass all the right environmental stuff to jython, but I am having trouble importing the necessary jar files to support the emulator.
Here is my startup script:
#!/usr/bin/bash
# dss.sh -- cygwin port of dss.bat, script to run js scripts on TI DSS.
# Path to necessary binaries
#DEBUGSERVER=/cygdrive/c/ti/ccsv5/ccs_base/DebugServer
PATH=/cygdrive/c/ti/ccsv5/eclipse/plugins/com.ti.dvt.ofssymbolmanager_3.1.0.201110191212:$PATH
PATH=/cygdrive/c/ti/ccsv5/eclipse/plugins/com.ti.dvt.tidisassembly_3.1.0.201110191212:$PATH
# DOS Path to Rhino JAR File
#RHINO_JAR='C:\ti\ccsv5\ccs_base\DebugServer\packages\ti\dss\java\js.jar'
# DOS Path to Jython JAR file
#JYTHON_JAR='C:\jython2.5.2\jython.jar'
# DOS Path to DVT Scripting JAR File
DVT_SCRIPTING_JAR='C:\ti\ccsv5\ccs_base\dvt\scripting\dvt_scripting.jar'
# DOS Path to DebugServer JAR File
SCRIPTING_JARS='C:\ti\ccsv5\ccs_base\DebugServer\packages\ti\dss\java\dss.jar'
# Name of Rhino Shell Java Application
#RHINO_SHELL=org.mozilla.javascript.tools.shell.Main
# Name of Rhino Debugger Java Application
#RHINO_DEBUGGER=org.mozilla.javascript.tools.debugger.Main
# Name of Jython Shell Java Application
#JYTHON_SHELL='org.python.util.interactiveconsole.class'
# use java run-time installed with code composer
JAVA_HOME=/cygdrive/c/ti/ccsv5/eclipse/jre
PATH=/cygdrive/c/ti/ccsv5/eclipse/jre/bin:$PATH
# Launch Rhino script engine. Import the scripting package.
#java.exe -Xms40m -Xmx384m -cp "$RHINO_JAR;$SCRIPTING_JARS;$DVT_SCRIPTING_JAR" $RHINO_SHELL $*
# Launch Rhino script Debugger engine. Import the scripting package.
#java.exe -Xms40m -Xmx384m -cp "$RHINO_JAR;$SCRIPTING_JARS;$DVT_SCRIPTING_JAR" $RHINO_DEBUGGER $*
# Launch the Jython script engine. Import the scripting package.
CLASSPATH="$CLASSPATH;$SCRIPTING_JARS;$DVT_SCRIPTING_JAR"
#java.exe -Xms40m -Xmx384m -cp "$JYTHON_JAR;$SCRIPTING_JARS;$DVT_SCRIPTING_JAR" -jar $JYTHON_JAR $*
/cygdrive/c/jython2.5.2/bin/jython.bat
And here is what I get when I try to import:
$ ./dss.sh
*sys-package-mgr*: processing new jar, 'C:\ti\ccsv5\eclipse\jre\lib\resources.jar'
*sys-package-mgr*: processing new jar, 'C:\ti\ccsv5\eclipse\jre\lib\rt.jar'
*sys-package-mgr*: processing new jar, 'C:\ti\ccsv5\eclipse\jre\lib\jsse.jar'
*sys-package-mgr*: processing new jar, 'C:\ti\ccsv5\eclipse\jre\lib\jce.jar'
*sys-package-mgr*: processing new jar, 'C:\ti\ccsv5\eclipse\jre\lib\charsets.jar'
*sys-package-mgr*: processing new jar, 'C:\ti\ccsv5\eclipse\jre\lib\ext\dnsns.jar'
*sys-package-mgr*: processing new jar, 'C:\ti\ccsv5\eclipse\jre\lib\ext\localedata.jar'
*sys-package-mgr*: processing new jar, 'C:\ti\ccsv5\eclipse\jre\lib\ext\sunjce_provider.jar'
*sys-package-mgr*: processing new jar, 'C:\ti\ccsv5\eclipse\jre\lib\ext\sunmscapi.jar'
*sys-package-mgr*: processing new jar, 'C:\ti\ccsv5\eclipse\jre\lib\ext\sunpkcs11.jar'
print "test"
test
from Packages.com.ti.debug.engine.scripting import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named Packages
from com.ti.debug.engine.scripting import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named ti
from debug.engine.scripting import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named debug
from engine.scripting import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named engine
from scripting import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named scripting
I have done a fair bit of python in my past, but I have never used jython before, and I am not a java programmer. What am I doing wrong? How do I import these jar files?