gvSIG bugs #4250

Scripting composer: Jython print statement is ignored in the console tab (log messages)

Added by Antonio Falciano about 8 years ago. Updated about 8 years ago.

Status:Closed% Done:

0%

Priority:NormalSpent time:-
Assignee:Joaquín del Cerro Murciano
Category:Scripting
Target version:2.3.0-2435 (rev. org.gvsig.desktop-2.0.141)
Severity:Minor Add-on version:
gvSIG version:2.3.0 Add-on build:
gvSIG build:2433 Add-on resolve version:
Operative System: Add-on resolve build:
Keywords: Proyecto:
Has patch: Hito:
Add-on name:Unknown

Description

The print statement is ignored in the console tab (log messages) of the Scripting composer.
For instance, if I execute the default Jython script called i.e. test.py:

# encoding: utf-8

from gvsig import *

def main(*args):

    #Remove this lines and add here your code

    print "hola mundo" 
    pass
these are the log messages:
Running script test.
Script test terminated.


Related issues

Related to Application: gvSIG desktop - gvSIG feature requests #4200: Upgrade the Jython standalone jar to 2.7.1b3 version (feb... Closed 04/14/2016

Associated revisions

Revision 679
Added by Joaquín del Cerro Murciano about 8 years ago

refs #4250. Fix capture output of scripts to the console panel.

History

#1 Updated by Joaquín del Cerro Murciano about 8 years ago

Al parecer tiene que ver con el cambio de la version de jython a la "2.7.1b3".
Si borro el jar de la "2.7.1b3" y pongo el de la "2.7.1b2" funciona de nuevo.
A ver si se me ocurre como rodearlo.

#2 Updated by Antonio Falciano about 8 years ago

Hi Joaquin,
it's my fault (#4200), sorry. Instead if I execute:

print "foo" 
in the Jython console, it works fine.

#3 Updated by Joaquín del Cerro Murciano about 8 years ago

#4 Updated by Joaquín del Cerro Murciano about 8 years ago

De momento no he encontrado forma de solucionarlo. De momento voy a volver a la version "2.7.1.b2".

#5 Updated by Antonio Falciano about 8 years ago

No problem, Joaquin. I'm sorry for the waste of time.

#6 Updated by Joaquín del Cerro Murciano about 8 years ago

Bueno, creo que ya he logrado solucionarlo.
Me ha tocado cambiar la forma en como se atrapaba la stdout del script (creo que ahora es mucho mas correcto) y me he tropezado con lo que parece un error en una clase de la implementacion de jython.
De momento he parcheado la clase PyScriptEngine de jython y parece que funciona.
He dado de alta un ticket en "bugs.jython.org" por si lo pueden solucionar en proximas versiones de jython o por si se ha de hacer de alguna otra forma.
http://bugs.jython.org/issue2507

#7 Updated by Antonio Falciano about 8 years ago

Thank you very much, Joaquin.

#8 Updated by Joaquín del Cerro Murciano about 8 years ago

  • Target version changed from 2.3.0-2447-final (rev. org.gvsig.desktop-2.0.153) to 2.3.0-2435 (rev. org.gvsig.desktop-2.0.141)

#9 Updated by Joaquín del Cerro Murciano about 8 years ago

  • Target version changed from 2.3.0-2435 (rev. org.gvsig.desktop-2.0.141) to 2.3.0-2447-final (rev. org.gvsig.desktop-2.0.153)
  • Assignee set to Joaquín del Cerro Murciano
  • Status changed from New to Fixed

#10 Updated by Joaquín del Cerro Murciano about 8 years ago

  • Target version changed from 2.3.0-2447-final (rev. org.gvsig.desktop-2.0.153) to 2.3.0-2435 (rev. org.gvsig.desktop-2.0.141)

#11 Updated by Antonio Falciano about 8 years ago

  • Status changed from Fixed to Closed

Also available in: Atom PDF