Quote from site :
"""
Playing around with it since yesterday, from what i have noticed, the jythonc compiler is missing in 2.5.x version of jython. But on doing a quick search i found a java based jython compiler scripts ( here and here ). Also there don't seem to be any jython compiler scripts in jython, perhaps i maybe looking at wrong place. So i wrote up a quick script which tries to do that.
"""
http://kalyanchakravarthy.net/blog/jython-script-to-compile-jython-scripts-to-java-class-files.html
Showing posts with label Jython. Show all posts
Showing posts with label Jython. Show all posts
Thursday, March 12, 2015
Friday, November 26, 2010
Friday, March 30, 2007
Jython - SSH
Ganymed est une librairie java qui implémente le protocole SSH.
Et bien sûr on peut parfaitement l'utiliser sous Jython :-)
Voici un exemple de servlet Jython utlisant Ganymed.
http://www.ganymed.ethz.ch/ssh2/
Et bien sûr on peut parfaitement l'utiliser sous Jython :-)
Voici un exemple de servlet Jython utlisant Ganymed.
http://www.ganymed.ethz.ch/ssh2/
from javax.servlet.http import HttpServlet
from ch.ethz.ssh2 import Connection,Session,StreamGobbler
from java.io import BufferedReader, InputStreamReader
hostname = '127.0.0.1'
username = 'admin'
password = 'Yu8KL%'
class MonServeur (HttpServlet):
def doGet(self,request,response):
self.doPost (request,response)
def doPost(self,request,response):
sortie = []
conn = Connection(hostname)
conn.connect()
isConnected = conn.authenticateWithPassword(username, password);
sess = conn.openSession()
sess.execCommand("uname -a && df -k")
stdout = StreamGobbler(sess.getStdout())
inputStreamReader = InputStreamReader(stdout)
br = BufferedReader(inputStreamReader)
toClient = response.getWriter()
response.setContentType ("text/html")
while (1):
line = br.readLine()
if line == None:
break
sortie.append(line)
toClient.println (sortie)
Wednesday, March 21, 2007
Utiliser Jython développer en Java
Jython est l'implémentation en Java du langage de programmation Python.
Il permet d'avoir accés à toutes les classes Java. En outre on peut très facilement
créer des applets, servlets, beans avec toute la simplicité du langage Python: le rêve.
Si vous voulez tester voici un lien qui explique comment par exemple
déployer une servlet Jython sur Tomcat. (J'ai testé cela marche très bien).
Subscribe to:
Posts (Atom)