Re: jython getting started question

2021-06-11 Thread Steve Pruitt via Python-list
Finally found the solution Options.importSite = false; which solved my issue. I can't set Bindings and pass args to script. The only example I found is for JavaScript. I think maybe it doesn't work for jython. Thanks From: Python-list on behalf of Steve Pru

Re: Jython info

2018-02-10 Thread Prahallad Achar
Thanks for the kind response. Yes. I shall upgrade the same. am trying to access GUI action elements from Jython to automate the Swing desktop application On Sat, Feb 10, 2018 at 9:50 PM, Dan Stromberg wrote: > On Sat, Feb 10, 2018 at 6:43 AM, Prahallad Achar > wrote: > > Hello team, > > Is it

Re: Jython info

2018-02-10 Thread Dan Stromberg
On Sat, Feb 10, 2018 at 6:43 AM, Prahallad Achar wrote: > Hello team, > Is it right to ask Jython related query here? If so kindly check my q here > otherwise sorry for posting here... I believe it can be done: http://lmgtfy.com/?q=jython+swing By the way, Jython 2.5 is pretty old. -- https://m

Re: Jython standalone

2015-11-15 Thread Christian Gollwitzer
Am 15.11.15 um 01:35 schrieb vjp2...@at.biostrategist.dot.dot.com: Jython is python in java at jython.org. I tried clicking and double clicking. I does a wait cycle (rotating arrow) then returns to attention. I think you are describing the Windows mouse cursor that displays a rotating wheel

Re: Jython standalone

2015-11-14 Thread Steven D'Aprano
On Sun, 15 Nov 2015 11:35 am, vjp2...@at.biostrategist.dot.dot.com wrote: > Jython is python in java at jython.org. > > I tried clicking and double clicking. Hi Vanos, I am perfectly aware of what Jython is, what I don't know is what you are "clicking and double-clicking". While we are very sm

Re: Jython standalone

2015-11-14 Thread vjp2 . at
Jython is python in java at jython.org. I tried clicking and double clicking. I does a wait cycle (rotating arrow) then returns to attention. I'm trying to run RDKIT, an app written for jython. THen I realised jython wasn't working at all. I've had same problem with some java jars. I only k

Re: Jython standalone

2015-11-13 Thread Steven D'Aprano
On Sat, 14 Nov 2015 12:35 pm, vjp2...@at.biostrategist.dot.dot.com wrote: > I click jython.org standalone jar and it just does a wait cycle. I'm afraid I can't completely understand the problem you are having, since you haven't really described it with sufficient detail. But my *guess* (and this

Re: Jython and can't write cache file

2015-06-21 Thread Johannes Bauer
On 21.06.2015 11:40, Cecil Westerhof wrote: > Thanks. Good that I asked it. :-D Good for you that you found someone able to enter words into a Google query. That's a skill you might want to acquire some time in the future. Cheers, Johannes -- >> Wo hattest Du das Beben nochmal GENAU vorhergesa

Re: Jython and can't write cache file

2015-06-21 Thread Cecil Westerhof
On Sunday 21 Jun 2015 10:56 CEST, Laura Creighton wrote: > In a message of Sun, 21 Jun 2015 09:53:23 +0200, Cecil Westerhof > writes: >> On openSUSE there is a very old version of Jython installed >> (2.2.1), so I installed the latest version (2.7.0). But when >> starting this I get: *sys-package-

Re: Jython and can't write cache file

2015-06-21 Thread Laura Creighton
In a message of Sun, 21 Jun 2015 09:53:23 +0200, Cecil Westerhof writes: >On openSUSE there is a very old version of Jython installed (2.2.1), >so I installed the latest version (2.7.0). But when starting this I >get: >*sys-package-mgr*: can't write cache file for > '/var/lib/h2/h2-1.3.176/bin

Re: Jython from bathc file?

2015-05-09 Thread Rustom Mody
On Sunday, May 10, 2015 at 7:55:22 AM UTC+5:30, vjp...@at.biostrategist.dot.dot.com wrote: > I have to try this and see if there is ome kind of init file in jython/python > sorta like autoexec.bat. Ialso have no idea if the commands they provide are > all it takes to run the app or I have to stay

Re: Jython from bathc file?

2015-05-09 Thread vjp2 . at
I have to try this and see if there is ome kind of init file in jython/python sorta like autoexec.bat. Ialso have no idea if the commands they provide are all it takes to run the app or I have to stay in jython.. sorry, I'm thinking at loud.. ok, thanks to all..

Re: Jython from bathc file?

2015-05-09 Thread vjp2 . at
Tee from gnuutils?? - = - Vasos Panagiotopoulos, Columbia'81+, Reagan, Mozart, Pindus, BioStrategist http://www.panix.com/~vjp2/vasos.htm ---{Nothing herein constitutes advice. Everything fully disclaimed.}--- [Homeland Security mean

Re: Jython from bathc file?

2015-05-09 Thread Dave Angel
On 05/09/2015 05:04 PM, vjp2...@at.biostrategist.dot.dot.com wrote: Thanks.. I suspected it wasn't meant to be taken as in the file THe one thing I'm not sure if Jython is suppsosedto keep running after the initisl stuff is loaded in.. To put the question in purely DOS terms if you run a progr

Re: Jython from bathc file?

2015-05-09 Thread Michael Torrie
On 05/09/2015 03:04 PM, vjp2...@at.biostrategist.dot.dot.com wrote: > Thanks.. I suspected it wasn't meant to be taken as in the file > > THe one thing I'm not sure if Jython is suppsosedto keep running > after the initisl stuff is loaded in.. > > > To put the question in purely DOS terms if you

Re: Jython from bathc file?

2015-05-09 Thread vjp2 . at
Thanks.. I suspected it wasn't meant to be taken as in the file THe one thing I'm not sure if Jython is suppsosedto keep running after the initisl stuff is loaded in.. To put the question in purely DOS terms if you run a program can you pipe it some commands and then keep it running to take the

Re: Jython from bathc file?

2015-05-09 Thread Steven D'Aprano
On Sat, 9 May 2015 09:36 am, vjp2...@at.biostrategist.dot.dot.com wrote: > How do I do this in a .bat file? > Do I include the Jython or pipe it? > > % CLASSPATH=$CLASSPATH:$RDBASE/Code/JavaWrappers/gmwrapper/org.RDKit.jar; > jython > -Djava.library.path=$RDBASE/Code/JavaWrappers/gmwrapper > Jyt

Re: Jython from bathc file?

2015-05-09 Thread Todd Vargo
On 5/8/2015 7:36 PM, vjp2...@at.biostrategist.dot.dot.com wrote: How do I do this in a .bat file? Do I include the Jython or pipe it? % CLASSPATH=$CLASSPATH:$RDBASE/Code/JavaWrappers/gmwrapper/org.RDKit.jar; jython -Djava.library.path=$RDBASE/Code/JavaWrappers/gmwrapper Jython 2.2.1 on java1.6

Re: Jython or Pyton issue-- Kindly Help me....

2014-10-15 Thread Peter Otten
Venugopal Reddy wrote: > Thanks for Help Sir, > > Am using " for feature in tree.findall( > > ".//{urn:ford/interface/VehicleOrder/LegacyFeatureMapping/v2}PortInstalledOptionFeature"): > ) " > > Please sir help me > > Here also this findall Method is not return any list value

Re: Jython or Pyton issue-- Kindly Help me....

2014-10-15 Thread Venugopal Reddy
Thanks for Help Sir, Am using " for feature in tree.findall( ".//{urn:ford/interface/VehicleOrder/LegacyFeatureMapping/v2}PortInstalledOptionFeature"): ) " Please sir help me Here also this findall Method is not return any list values. On Wednesday, October 15, 2014 1:03:00 PM UTC

Re: Jython or Pyton issue-- Kindly Help me....

2014-10-15 Thread Peter Otten
Venugopal Reddy wrote: > Actuvally am having below XML File: > > > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";> > xmlns:a="urn:ford/VehicleOrder/LegacyFeatureMapping/v2.0" > xmlns:b="urn:ford/VehicleOrder/SingleOrderEdit/v1.0" > xmlns:c="urn:ford/interface/VehicleOrder/LegacyFe

Re: Jython or Pyton issue-- Kindly Help me....

2014-10-14 Thread Venugopal Reddy
Actuvally am having below XML File: http://schemas.xmlsoap.org/soap/envelope/";> 13001 2014 12 178

Re: Jython or Pyton issue-- Kindly Help me....

2014-10-14 Thread Peter Otten
Venugopal Reddy wrote: > Ok, I will explain my problem in details : > > I have below XML: > > > > > 1 > 2008 > 2009> > 141100 > > > > > 4 > 2011 > 59900 > > > > 68 > 2011

Re: Jython or Pyton issue-- Kindly Help me....

2014-10-14 Thread Venugopal Reddy
Ok, I will explain my problem in details : I have below XML: 1 2008 2009> 141100 4 2011 59900 68 2011 13600 >From

Re: Jython or Pyton issue-- Kindly Help me....

2014-10-13 Thread Ian Kelly
On Mon, Oct 13, 2014 at 5:39 AM, Venugopal Reddy wrote: > Dear All, > > How to write a program for reading or parsing the XML file in Sub root Wise. I don't know what "Sub root Wise" is. You can find an overview of Python's XML parsing interfaces at https://docs.python.org/2/library/xml.html. I w

Re: Jython - Can't access enumerations?

2013-11-29 Thread Tim Delaney
On 30 November 2013 03:15, Eamonn Rea wrote: > Ok, here's the code: > [elided] > As I said, please also show the *exact* error - copy and paste the stack trace. Tim Delaney -- https://mail.python.org/mailman/listinfo/python-list

Re: Jython - Can't access enumerations?

2013-11-29 Thread Eamonn Rea
Ok, here's the code: body_def = BodyDef() # Imports the BodyDef class fine. body_def.type = BodyDef.DynamicBody # Says it can't find a module from LibGDX called BodyDef. All my code: from com.badlogic.gdx import Game, Gdx, Screen from com.badlogic.gdx.backends.lwjgl import LwjglApplicationConf

Re: Jython - Can't access enumerations?

2013-11-28 Thread Tim Delaney
On 29 November 2013 04:22, Eamonn Rea wrote: > Hello! I'm using Jython to write a game with Python/Jython/LibGDX. I > wasn't having any trouble, and everything was going well, but sadly I can't > access items in enumerations. > > If you know about the LibGDX library and have used it, you'll proba

Re: jython lacks working xml processing modules?

2012-07-18 Thread Matej Cepl
On 18/07/12 05:12, gaodexiaozh...@gmail.com wrote: However,there is one project implemented by Python used PyXML and now my Jython project has to depend on it ,so I am afraid that if Jython doesn't support PyXML,then my jython project can not depend on the original Python project ,then my jython

Re: jython lacks working xml processing modules?

2012-07-17 Thread gaodexiaozheng
在 2012年7月17日星期二UTC+8下午6时02分31秒,Stefan Behnel写道: > Matej Cepl, 17.07.2012 11:39: > > On 17/07/12 10:35, gaodexiaozh...@gmail.com wrote: > >>> > I'm trying to parse an xml file with jython > (not through java > >>> parsers > >>> > like xerces). > > > > https://code.google.com/p/jython-ele

Re: jython lacks working xml processing modules?

2012-07-17 Thread Stefan Behnel
Matej Cepl, 17.07.2012 11:39: > On 17/07/12 10:35, gaodexiaozh...@gmail.com wrote: >>> > I'm trying to parse an xml file with jython (not through java >>> parsers >>> > like xerces). > > https://code.google.com/p/jython-elementtree/ ??? Note that this ships with Jython 2.5. Stefan -- http://ma

Re: jython lacks working xml processing modules?

2012-07-17 Thread Matej Cepl
On 17/07/12 10:35, gaodexiaozh...@gmail.com wrote: > I'm trying to parse an xml file with jython (not through java parsers > like xerces). https://code.google.com/p/jython-elementtree/ ??? -- http://mail.python.org/mailman/listinfo/python-list

Re: jython lacks working xml processing modules?

2012-07-17 Thread Stefan Behnel
gaodexiaozh...@gmail.com, 17.07.2012 10:35: > hi,do you know the PyXML whether can be supported by Jython ? PyXML is a dead project, don't use it. You can use ElementTree in Jython, just as in Python. Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: jython lacks working xml processing modules?

2012-07-17 Thread gaodexiaozheng
在 2003年11月24日星期一UTC+8下午7时42分31秒,Paul Boddie写道: > janeaustin...@hotmail.com (Jane Austine) wrote in message > news:;... > > I'm trying to parse an xml file with jython (not through java parsers > > like xerces). > > > > I tried minidom in jython 2.1 a

Re: Jython and PYTHONSTARTUP

2012-06-22 Thread Hans Mulder
On 21/06/12 02:26:41, Steven D'Aprano wrote: > There used to be a page describing the differences between Jython and > CPython here: > > http://www.jython.org/docs/differences.html > > but it appears to have been eaten by the 404 Monster. It has been moved to: http://www.jython.org/archive/21/

RE: Jython and PYTHONSTARTUP

2012-06-22 Thread Prasad, Ramit
> Does Jython 2.5 honour the PYTHONSTARTUP environment variable? According > to my testing, it doesn't. > > There used to be a page describing the differences between Jython and > CPython here: > > http://www.jython.org/docs/differences.html > > but it appears to have been eaten by the 404 Monst

Re: Jython 2.7 alpha1 is out!

2012-05-19 Thread Guido van Rossum
Congrats Frank! I reposted this on my G+ account and got some interesting comments. https://plus.google.com/u/0/115212051037621986145/posts/ifyqW3JBd3a There's got to be a way for you to make money off the Oracle connection! (PS: It would have been nice if there was an announcement page on the J

Re: Jython callable. How?

2012-03-04 Thread Sirotin Roman
> Perhaps if you show us what you actually do, and what happens, we might > be able to tell you what is happening. Please COPY AND PASTE the full > traceback. Here is my code: # Trying to make callable staticmethod class sm(staticmethod): def __call__(self, *args, **kwargs): """ I know

Re: Jython callable. How?

2012-03-04 Thread Steven D'Aprano
On Sun, 04 Mar 2012 16:03:56 +0700, Sirotin Roman wrote: > Hi. > How exactly jython decides is object callable or not? I defined __call__ > method but interpreter says it's still not callable. BTW, my code works > in cpython Works for me. steve@runes:~$ jython *sys-package-mgr*: processing modif

Re: Jython callable. How?

2012-03-04 Thread Arnaud Delobelle
On Mar 4, 2012 9:04 AM, "Sirotin Roman" wrote: > > Hi. > How exactly jython decides is object callable or not? I defined > __call__ method but interpreter says it's still not callable. > BTW, my code works in cpython It will help if you show us the code. -- Arnaud -- http://mail.python.org/mai

Re: [jython] Problem with an huge dictionary

2010-05-17 Thread Allan Davis
KeoBox, Can i look at the jython file you are executing? the ClassFormatException is not with the size of the dictionary. Jython is failing on an import. thanks, -- Allan Davis Member of NetBeans Dream Team http://wiki.netbeans.org/NetB

Re: Jython as an alternative to Python

2010-03-29 Thread Tim Johnson
On 2010-03-29, Steve Holden wrote: > Tim Johnson wrote: <<.>> 1)What can jython *do* that cannot be done by python. >> > Import Java classes and instantiate them, calling their methods from Python. Of course >> 2)What is the current state of jython as a development community? >> I.E. is it bei

Re: Jython as an alternative to Python

2010-03-29 Thread Steve Holden
Tim Johnson wrote: > FYI: I've used python for years primarily on *nix platforms and > primarily for web programming. I'm considering studying a scripting > language that uses and accesses java. My first obvious choice would by > jython. The following questions could probably be answered by pointer

Re: jython and java application

2009-11-30 Thread ShoqulKutlu
Welcome a million :) On Nov 26, 5:33 am, KB wrote: > Kutlu, > > I already have a first born, else I would name her after you. > > You are brilliant. That's what it was. Kudos. > > For future ref for fellow boneheads like me, in Eclipse, under Project > properties, Jython Class Path, Add External

Re: jython and java application

2009-11-30 Thread KB
Kutlu, I already have a first born, else I would name her after you. You are brilliant. That's what it was. Kudos. For future ref for fellow boneheads like me, in Eclipse, under Project properties, Jython Class Path, Add External JAR... Thanks a million! -- http://mail.python.org/mailman/listi

Re: jython and java application

2009-11-25 Thread ShoqulKutlu
Hi, I don't know how do you call the java library from within your jython application it gives java.lang.NoClassDefFoundError This looks like you referenced jar or whatever else from your jython application which also needs a class com/bloomberglp/blpapi/Session in another library file. It might r

Re: jython and java application

2009-11-25 Thread KB
Hmmm, for some reason my follow up post didn't make it. Modified jython script to: # Eclipse package name for java application import krbtest import java.lang as lang from java.lang import String from jarray import array myargs=array([],String) krbtest.SimpleHistoricTutorial().main(myargs) **

Re: jython and java application

2009-11-25 Thread ShoqulKutlu
I don't know if it's right place but normally main method requires an args even it is not needed to supply from commandline. Maybe this is a jython runtime error and requires at least an empty argument. You could try to pass and empty string array like ['']. I'm not using jython please use your own

Re: jython and java application

2009-11-25 Thread MRAB
KB wrote: Hi there, Apologies if this is on the wrong group, this is a jython question. Please redirect me to the correct group if this is in error. I have a java application that takes no arguements. When I run it, it spits out output, and finishes. I am trying to run this java application fr

Re: Jython on Google AppEngine.

2009-04-10 Thread Aurélien Campéas
Le 9/04/09 23:51, Tino Wildenhain a écrit : Jason Scheirer wrote: On Apr 9, 9:12 am, Alan Kennedy wrote: Hi all, You may be interested to know that you can now run jython 2.2 out of the box on Google AppEngine, thanks to their new java support. ... Finally! A way to run Python on App Engin

Re: Jython on Google AppEngine.

2009-04-09 Thread Tino Wildenhain
Jason Scheirer wrote: On Apr 9, 9:12 am, Alan Kennedy wrote: Hi all, You may be interested to know that you can now run jython 2.2 out of the box on Google AppEngine, thanks to their new java support. ... Finally! A way to run Python on App Engine! ? Is that some kind of weird humor? :-)

Re: Jython on Google AppEngine.

2009-04-09 Thread Jason Scheirer
On Apr 9, 9:12 am, Alan Kennedy wrote: > Hi all, > > You may be interested to know that you can now run jython 2.2 out of > the box on Google AppEngine, thanks to their new java support. > > A patch is required for jython 2.5, but we will be folding this in > before the jython 2.5 RC release over

Re: Jython Dev in Eclipse

2009-02-17 Thread Benjamin Kaplan
On Tue, Feb 17, 2009 at 4:55 PM, ntwrkd wrote: > Does anyone use Pydev or JyDT for Eclipse. > Can you recommend one against the other? JyDT hasn't had a release in the last few years. I don't think it will work with the new versions of eclipse or Jython. -- > http://mail.python.org/mailman/lis

Re: Jython 2.5 Beta1 Released!

2009-01-09 Thread Matthew Nuzum
On Fri, Jan 9, 2009 at 3:37 PM, Frank Wierzbicki wrote: > On behalf of the Jython development team, I'm pleased to announce that > Jython 2.5b1 is available for download: > http://downloads.sourceforge.net/jython/jython_installer-2.5b1.jar. > See the installation instructions here: > http://www.jy

Re: Jython: Packing several .py on .jar, problem importing .py modules within the .jar

2008-12-03 Thread Gubatron
cont... Take in consideration /** Hashtable of URLClassLoaders for each of the jars loaded */ private Hashtable classLoaders; Here's an example: org.python.core.PySystemState pySys = new org.python.core.PySystemState(); //classLoad

Re: Jython: Packing several .py on .jar, problem importing .py modules within the .jar

2008-12-03 Thread Gubatron
I've managed to solve this problem. I can now run a python script that lives inside a Jar. The python script is now able to import other scripts within the same jar, and it's also able to import java classes that live within the jar. The problem was solved by giving the Jython Interpreter the pro

Re: Jython import coventions

2007-10-10 Thread OnCallSupport321
On Oct 9, 10:42 pm, Benjamin <[EMAIL PROTECTED]> wrote: > When importing Java packages in Jython, what is the convention to > simplify imports? For example: > import java.util as util > Is this correct? Or should I use from * import *? I have preferred the style... import java import javax ...an

Re: Jython 2.2 on Ubuntu

2007-08-29 Thread smalltalk
On Aug 29, 10:50 pm, Neil Wallace <[EMAIL PROTECTED]> wrote: > Thanks Tim, > > I subscribed to the Jython group hosted by sourceforge, and they are a > great bunch of guys/gals. > > Here's what I did to fix my problem. > > 1. removed Jython 2.1 (using Synaptic)jytho > 2. added the following lines (

Re: Jython 2.2 on Ubuntu

2007-08-29 Thread Neil Wallace
Thanks Tim, I subscribed to the Jython group hosted by sourceforge, and they are a great bunch of guys/gals. Here's what I did to fix my problem. 1. removed Jython 2.1 (using Synaptic)jytho 2. added the following lines (as root) to /etc/profile # set PATH for Jython PATH=$

Re: Jython 2.2 on Ubuntu

2007-08-29 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Neil Wallace wrote: > I have used the > GUI installer of Jython 2.2, and installed it to the default > /root/jython2.2 directory. You do realize that /root is the home directory of the root user, normally off-limits to normal users? Usually if you're installing yo

Re: Jython 2.2 on Ubuntu

2007-08-28 Thread Tim Couper
you need to ensure that the correct jython executable is in a directory which is on your on your path. I've just successfully test-subscribed to https://lists.sourceforge.net/lists/listinfo/jython-users. Maybe you could try again. Tim Dr Tim Couper CTO, SciVisum Ltd www.scivisum.com Neil

Re: Jython - problem import os

2007-08-14 Thread nmin
Thats it ... Additionally I had to set the python path with sys.path.append to the Lib folder .. and now it works perfect. thanks a lot Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: Jython - variables are stored somehow

2007-08-14 Thread nmin
works perfect ... thanks a lot! -- http://mail.python.org/mailman/listinfo/python-list

Re: Jython - variables are stored somehow

2007-08-09 Thread Marc 'BlackJack' Rintsch
On Thu, 09 Aug 2007 05:30:00 -0700, nmin wrote: > So, executing the function genData() in skript .py runs without > problem but if I execute the same function again, the data from the > first run is stored somehow and is added to the new data. > > So, if you look at the result: > #1 in DatenTypen

Re: Jython - variables are stored somehow

2007-08-09 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > Hi, > > I'm using Jython in combination with java. > > I wrote a jython skript, which calls a function from another jython > module called library.py. > > So, executing the function genData() in skript .py runs without > problem but if I execute the same function aga

RE: Jython - problem import os

2007-08-08 Thread Delaney, Timothy (Tim)
[EMAIL PROTECTED] wrote: > I'm using Jython in combination with Java, webservices and jboss4.0.4. > > The webservice is implemented in java and creates an PythonInterpreter > object which loads the jython scripts. > I wrote an jython script which uses a function from another jython > file called

Re: Jython 2.2 Beta2 is available

2007-05-11 Thread Aahz
In article <[EMAIL PROTECTED]>, Charlie Groves wrote: > >I'm happy to announce that Jython 2.2-beta2 is available for download: >http://sourceforge.net/project/showfiles.php?group_id=12867&package_id=12218&release_id=507592 >See http://jython.org/Project/installation.html for installation instruct

Re: jython: user-defined modules

2007-04-25 Thread Diez B. Roggisch
Gregor Stich wrote: > Dear all, > > I hope my question is here in the right place... > What I want to achieve is a communication between Java and Python. We > have a pretty strong framework of existing python scripts and modules. > Now I want to use jython in order to faciliate the communication

Re: Jython Data Extraction problem

2007-03-08 Thread Diez B. Roggisch
Steve Williams wrote: > The data is an 8-byte 2s complement binary integer stored in a MSSQL > 2005 CHAR column. (COBOL did that, not me). I'm using zxJDBC to read > the data and Jython to process. > I could extract the integer if it wasn't returned in the resultset as > unicode. Things like ord

Re: jython import search path

2007-02-23 Thread Diez B. Roggisch
> Accepted strategy? It doesn't seem very portable. It assumes that > everyone puts their library > modules in the exact same place. Or do they just figure that changing > the sys.path.append > line is easy enough? Portability has nothing to do with it. If you arrange your project in a way that th

Re: jython import search path

2007-02-22 Thread Russ
Diez B. Roggisch wrote: > >> Maybe Jython expert has the perfect answer but til then. > >> > >> Did you try: > >> > >> sys.path.append('path to search') > >> > >> Usually this works if nothing else does. > >> > >> -Larry > > > > Thanks. That's a good workaround, but I would like to know the > > "

Re: jython import search path

2007-02-22 Thread Diez B. Roggisch
Russ wrote: > On Feb 21, 4:15 pm, Larry Bates <[EMAIL PROTECTED]> wrote: >> Russ wrote: >> > I have a Python program that I want to run in Jython so I can get Java >> > bytecode output. The program runs fine in Python, but when I change >> > the first line of the main program to make it run in Jyt

Re: jython import search path

2007-02-21 Thread Russ
On Feb 21, 4:15 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > Russ wrote: > > I have a Python program that I want to run in Jython so I can get Java > > bytecode output. The program runs fine in Python, but when I change > > the first line of the main program to make it run in Jython, it fails > > t

Re: jython import search path

2007-02-21 Thread Larry Bates
Russ wrote: > I have a Python program that I want to run in Jython so I can get Java > bytecode output. The program runs fine in Python, but when I change > the first line of the main program to make it run in Jython, it fails > to find some of the imported modules. These are just plain Python > im

Re: Jython / Java / C / C++ interoperability

2007-02-12 Thread Roman Yakovenko
On 12 Feb 2007 09:57:48 -0800, Charity <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a code base primarily written in Java. I would like to use > Jython to "use" this code base. Everything is wonderful because > Jython calls Java easily. > > However, there may be a time when I would like to cal

Re: Jython

2007-02-03 Thread bearophileHUGS
[EMAIL PROTECTED]: > Files aren't lists and thus don't have the functions for iteration. > Try: > def go(): > for line in open("bobo.txt", "r").readlines(): > print line > go() CPython 2.1 has xreadlines, maybe Jython has it too. Bye, bearophile -- http://mail.python.org

Re: Jython

2007-02-03 Thread Peter Otten
Boris Ozegovic wrote: > Boris Ozegovic wrote: > >> [EMAIL PROTECTED] wrote: >> >>> Files aren't lists and thus don't have the functions for iteration. >> >> They do have iterator: >> >> C:\Documents and Settings\Silovana Vjeverica\Desktop>python FileReader.py >> 'import site' failed; use -v fo

Re: Jython

2007-02-03 Thread Boris Ozegovic
[EMAIL PROTECTED] wrote: > Files aren't lists and thus don't have the functions for iteration. > > Try: > > def go(): > for line in open("bobo.txt", "r").readlines(): > print line > > go() For example, you can do even this: import sys for line in sys.stdin: pr

Re: Jython

2007-02-03 Thread Boris Ozegovic
Boris Ozegovic wrote: > [EMAIL PROTECTED] wrote: > >> Files aren't lists and thus don't have the functions for iteration. > > They do have iterator: > > C:\Documents and Settings\Silovana Vjeverica\Desktop>python FileReader.py > 'import site' failed; use -v for traceback > boris ozegovic > vedr

Re: Jython

2007-02-03 Thread Boris Ozegovic
[EMAIL PROTECTED] wrote: > Files aren't lists and thus don't have the functions for iteration. They do have iterator: C:\Documents and Settings\Silovana Vjeverica\Desktop>python FileReader.py 'import site' failed; use -v for traceback boris ozegovic vedran ozegovic -- "A mi smo stranci u vlast

Re: Jython

2007-02-03 Thread gregturn
On Feb 3, 11:21 am, Boris Ozegovic <[EMAIL PROTECTED]> wrote: > Hi > > Why this doesn't work: > > def go(): > for line in open("bobo.txt", "r"): > print line > > go() > > python FileReader.py: everything ok > jython FileReader.py: > > Traceback (innermost last): > File "Fi

Re: Jython compile errors ...

2006-11-13 Thread John Machin
[EMAIL PROTECTED] wrote: > If you are looking for an example of jython there is one in embeded in > csound blue. available from the csounds.com website I believe. I have > used it under the new java framework. I am not far enough along to > know if you are missing brackets {} exc and () and one

Re: Jython compile errors ...

2006-11-13 Thread [EMAIL PROTECTED]
If you are looking for an example of jython there is one in embeded in csound blue. available from the csounds.com website I believe. I have used it under the new java framework. I am not far enough along to know if you are missing brackets {} exc and () and one ; but you can try getting the pyt

RE: jython and toString

2006-10-16 Thread Walter S. Leipold
toString() isn't supposed to be a static method. When you call x.toString(), you're accessing x's non-static version of toString(), which is inherited from Object. -- Walt ivansh ([EMAIL PROTECTED]) wrote: > For one java class (Hello) i use another (HelloPrinter) to build the > string represen

Re: jython and toString

2006-10-16 Thread Jon Clements
ivansh wrote: > Hello, > > For one java class (Hello) i use another (HelloPrinter) to build the > string representation of the first one. When i've tried to use this > from within jython, HelloPrinter.toString(hello) call gives results > like Object.toString() of hello has being called. The exam

Re: Jython: exec a string

2006-04-21 Thread Fabio Zadrozny
On 4/21/06, Edward Elliott <[EMAIL PROTECTED]> wrote: iirc java doesn't like multiple classes in a single file (not countinganonymous or inner classes).  sounds like jython may have the samerestriction...Actually, that's not completely true. The restriction is that you can have only 1 public class

Re: Jython: exec a string

2006-04-21 Thread Edward Elliott
iirc java doesn't like multiple classes in a single file (not counting anonymous or inner classes). sounds like jython may have the same restriction... abcd wrote: > the error i get when i run the exec is, "java.lang.ClassFormatError"... > > thanks > -- http://mail.python.org/mailman/listinf

Re: Jython: exec a string

2006-04-21 Thread abcd
the error i get when i run the exec is, "java.lang.ClassFormatError"... thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Jython

2006-03-11 Thread Wei Zhuo
jython2.2 is under developing, you can download the alpha version in sourceforge.2006/3/12, rtilley <[EMAIL PROTECTED]>: Is development still going on with Jython? Version 2.1 came out in 2001and it's still the most current stable release.Thanks!--http://mail.python.org/mailman/listinfo/python-list

Re: Jython Pythonpath question

2006-02-21 Thread Kent Johnson
Mark Fink wrote: > Hi there, > > I have a source file FailFixture.py in the folder > D:\AUT_TEST\workspace\JyFIT\testutil. Now I want to import the file > with "import testutil.FailFixture". Unfortunately I could not figure > out how to set this up. I am convinced that > "D:\AUT_TEST\workspace\JyF

Re: jython socket sendall

2006-02-21 Thread Mark Fink
I used send instead. This should work. -Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: Jython socket typecasting problems

2006-02-13 Thread Steve Holden
Kent Johnson wrote: > Mark Fink wrote: > >>I added the two print lines as recommended: >>self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) >>print type(self.host), repr(self.host) >>print type(self.port), repr(self.port) >>self.socket.connect((self.hos

Re: Jython socket typecasting problems

2006-02-13 Thread Kent Johnson
Mark Fink wrote: > I added the two print lines as recommended: > self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > print type(self.host), repr(self.host) > print type(self.port), repr(self.port) > self.socket.connect((self.host, self.port)) >

Re: Jython inherit from Java class

2006-02-13 Thread Kent Johnson
Mark Fink wrote: > Hi Kent, > many thanks for your help! In the meantime I received my "Jython > Essentials" book and hope that I have much fewer questions in the near > future. > One last question for this thread. I tried to inherit from a Java class > and override on method. I figured that this a

Re: Jython socket typecasting problems

2006-02-13 Thread Donn Cave
In article <[EMAIL PROTECTED]>, "Mark Fink" <[EMAIL PROTECTED]> wrote: > thanks to the help of this group I moved a tiny step forward. Obviously > it is not possible to resolve name localhost: > Type "copyright", "credits" or "license" for more information. > >>> import socket > >>> s=socket.socke

Re: Jython inherit from Java class

2006-02-13 Thread Mark Fink
Hi Kent, many thanks for your help! In the meantime I received my "Jython Essentials" book and hope that I have much fewer questions in the near future. One last question for this thread. I tried to inherit from a Java class and override on method. I figured that this approach was nonsense because

Re: Jython socket typecasting problems

2006-02-13 Thread Mark Fink
thanks to the help of this group I moved a tiny step forward. Obviously it is not possible to resolve name localhost: Type "copyright", "credits" or "license" for more information. >>> import socket >>> s=socket.socket(socket.AF_INET, socket.SOCK_STREAM) >>> s.connect(localhost, 8080) Traceback (in

Re: Jython socket typecasting problems

2006-02-12 Thread Steve Holden
Diez B. Roggisch wrote: >>This is the code section of my server class (I cut this from a Python >>example): >>def establishConnection(self): >>self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) >>self.socket.connect((self.host, self.port)) >>Do I have to use explici

Re: Jython socket typecasting problems

2006-02-12 Thread Kent Johnson
Mark Fink wrote: > The cast to Integer for the port does not work either: > > D:\AUT_TEST\workspace\JyFIT>jython fit/JyFitServer2.py "" 1234 23 > ['fit/JyFitServer2.py', '', '1234', '23'] > > Traceback (innermost last): > File "fit/JyFitServer2.py", line 146, in ? > File "fit/JyFitServer2.py"

Re: Jython socket typecasting problems

2006-02-11 Thread Donn Cave
Quoth "Diez B. Roggisch" <[EMAIL PROTECTED]>: | > This is the code section of my server class (I cut this from a Python | > example): | > def establishConnection(self): | > self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | > self.socket.connect((self.host, self.p

  1   2   >