Page 1 of 1

I can not run a script in McIDAS-V 1.3

Posted: Thu Jul 25, 2013 1:49 am
by glez_b
I'm using the latest version of McIDAS-V to run an ISL script, i do the following:

/ home / mcidas / McIDAS-V-SYSTEM / runMcV / home/mcidas/isl/basic1.isl


When I run the script in linux console I do not get any results.

Try running a python script as follows and again I do not get any results.
/ home / mcidas / McIDAS-V-SYSTEM / runMcV -script / home / mcidas/ python/ir.py

I try to run the other way

/ home / mcidas / McIDAS-V-SYSTEM / runMcV -islfile / home / mcidas/ python/ir.py

I do not get any results.

What is the best way to run this kind of script? In previous versions of McIDAS-V, the commands are executed properly and appeared one popup screen with the instruction given in the script.

Re: I can not run a script in McIDAS-V 1.3

Posted: Fri Jul 26, 2013 1:14 pm
by Rick
Hi Boris,

Lets's try a couple of things. First open a jython shell and copy and paste your script into the jython shell:

From the Map Display -> Tools -> Forumlas -> Jython Shell
There is a double arrow on the right side of the Jython Shell, click that (allows you to enter multiple line)
Copy and paste your script into the Window (in the box next to the word evaluate).
Now click evaluate.

This will show you any errors you may have in your script.

When starting your script from the command line, use -script as -isl file is no-longer an option.

Also, please post your /home/mcidas/McIDAS-V/mcidasv.log and ir.py

Rick

Re: I can not run a script in McIDAS-V 1.3

Posted: Sun Jul 28, 2013 6:54 pm
by glez_b
It's a simple script, but I'm studying them

This is my code:

Code: Select all

<isl debug="true">
     <echo message="Here is my loop:"/>
     <group loop="5" sleep="1">
         <echo message="Hello world"/>
     </group>
     <echo message="Done"/>
</isl>



When I run the script, in linux console

[mcidas@localhost McIDAS-V-System]$ ./runMcV /home/mcidas/isl/basic2.isl

do not see the messages that were written in the script. Only appear the following letters:

Reading system configuration...
sys mem: 3778
mcv flags: -Dvisad.java3d.textureNpot=false -Dvisad.java3d.imageByRef=true -Dvisad.java3d.geometryByRef=true -Didv.3d=true -Didv.sysmem=3778
./jre/bin/java -XX:MaxPermSize=128m -Xmx3022M -XX:MaxPermSize=128m -Djava.ext.dirs="/home/mcidas/McIDAS-V-System/javaextdir":"/home/mcidas/McIDAS-V-System/jre/lib/ext":"/home/mcidas/Library/Java/Extensions" -Dlogback.configurationFile="edu/wisc/ssec/mcidasv/resources/logback.xml" -Dmcv.userpath="/home/mcidas/McIDAS-V" -Dpython.security.respectJavaAccessibility=false -classpath ".:./rsyntaxtextarea-2.0.2.jar:./sysout-over-slf4j-1.0.2.jar:./commons-math-2.2.jar:./mcv_userguide.jar:./log4j-over-slf4j-1.6.1.jar:./logback-classic-0.9.29.jar:./logback-core-0.9.29.jar:./miglayout-4.0-swing.jar:./slf4j-api-1.6.1.jar:./jython.jar:./eventbus-1.3.jar:./mcidasv.jar:./auxdata.jar:./external.jar:./local-idv.jar:./idv.jar:./local-visad.jar:./ncIdv.jar:./visad.jar" -da edu.wisc.ssec.mcidasv.McIDASV -Dvisad.java3d.textureNpot=false -Dvisad.java3d.imageByRef=true -Dvisad.java3d.geometryByRef=true -Didv.3d=true -Didv.sysmem=3778 -userpath "/home/mcidas/McIDAS-V" /home/mcidas/isl/basic2.isl

After a few seconds, returns again to this:
[mcidas@localhost McIDAS-V-System]$

If anyone can guide me, I appreciate it

Re: I can not run a script in McIDAS-V 1.3

Posted: Mon Jul 29, 2013 1:24 am
by tomw
Boris --

McIDAS-V does not support ISL scripting. You will need to stick with Jython...

In your Jython scripts, you might either look in the jython.log file for your output, or better yet, create your own output file using Jython's file open/write/close -- that way you can control where your text output goes, etc. Just a thought.

For example:

Code: Select all

f = open("/temp/abc.txt","w");
f.write("hello world");
f.close();