You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
(8) |
Dec
(51) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(105) |
Feb
(93) |
Mar
(194) |
Apr
(145) |
May
(100) |
Jun
(111) |
Jul
(117) |
Aug
(126) |
Sep
(233) |
Oct
(138) |
Nov
(164) |
Dec
(109) |
2002 |
Jan
(216) |
Feb
(175) |
Mar
(216) |
Apr
(194) |
May
(157) |
Jun
(140) |
Jul
(158) |
Aug
(73) |
Sep
(105) |
Oct
(164) |
Nov
(104) |
Dec
(95) |
2003 |
Jan
(72) |
Feb
(69) |
Mar
(81) |
Apr
(151) |
May
(101) |
Jun
(139) |
Jul
(99) |
Aug
(118) |
Sep
(115) |
Oct
(151) |
Nov
(161) |
Dec
(102) |
2004 |
Jan
(120) |
Feb
(175) |
Mar
(106) |
Apr
(111) |
May
(54) |
Jun
(78) |
Jul
(76) |
Aug
(105) |
Sep
(94) |
Oct
(143) |
Nov
(75) |
Dec
(85) |
2005 |
Jan
(99) |
Feb
(77) |
Mar
(164) |
Apr
(97) |
May
(79) |
Jun
(57) |
Jul
(65) |
Aug
(102) |
Sep
(95) |
Oct
(129) |
Nov
(123) |
Dec
(52) |
2006 |
Jan
(48) |
Feb
(99) |
Mar
(90) |
Apr
(51) |
May
(81) |
Jun
(136) |
Jul
(56) |
Aug
(109) |
Sep
(50) |
Oct
(44) |
Nov
(74) |
Dec
(75) |
2007 |
Jan
(92) |
Feb
(137) |
Mar
(93) |
Apr
(79) |
May
(52) |
Jun
(74) |
Jul
(143) |
Aug
(175) |
Sep
(154) |
Oct
(137) |
Nov
(88) |
Dec
(90) |
2008 |
Jan
(58) |
Feb
(113) |
Mar
(167) |
Apr
(88) |
May
(105) |
Jun
(37) |
Jul
(87) |
Aug
(72) |
Sep
(56) |
Oct
(41) |
Nov
(102) |
Dec
(70) |
2009 |
Jan
(115) |
Feb
(113) |
Mar
(126) |
Apr
(58) |
May
(125) |
Jun
(45) |
Jul
(90) |
Aug
(125) |
Sep
(84) |
Oct
(61) |
Nov
(111) |
Dec
(61) |
2010 |
Jan
(85) |
Feb
(86) |
Mar
(130) |
Apr
(58) |
May
(57) |
Jun
(32) |
Jul
(25) |
Aug
(50) |
Sep
(41) |
Oct
(65) |
Nov
(63) |
Dec
(24) |
2011 |
Jan
(43) |
Feb
(31) |
Mar
(28) |
Apr
(68) |
May
(53) |
Jun
(42) |
Jul
(58) |
Aug
(26) |
Sep
(51) |
Oct
(76) |
Nov
(60) |
Dec
(9) |
2012 |
Jan
(16) |
Feb
(32) |
Mar
(32) |
Apr
(39) |
May
(16) |
Jun
(19) |
Jul
(3) |
Aug
(11) |
Sep
(35) |
Oct
(47) |
Nov
(28) |
Dec
(18) |
2013 |
Jan
(18) |
Feb
(36) |
Mar
(10) |
Apr
(7) |
May
(7) |
Jun
(27) |
Jul
(17) |
Aug
(35) |
Sep
(19) |
Oct
(31) |
Nov
(8) |
Dec
(22) |
2014 |
Jan
(5) |
Feb
(11) |
Mar
(18) |
Apr
(23) |
May
(26) |
Jun
(14) |
Jul
(18) |
Aug
(26) |
Sep
(20) |
Oct
(48) |
Nov
(13) |
Dec
(9) |
2015 |
Jan
(9) |
Feb
(15) |
Mar
(25) |
Apr
(10) |
May
(26) |
Jun
(6) |
Jul
(13) |
Aug
(5) |
Sep
(14) |
Oct
(36) |
Nov
(24) |
Dec
(18) |
2016 |
Jan
(24) |
Feb
(11) |
Mar
(1) |
Apr
(6) |
May
(7) |
Jun
(3) |
Jul
(9) |
Aug
(15) |
Sep
(22) |
Oct
(5) |
Nov
(5) |
Dec
(2) |
2017 |
Jan
(20) |
Feb
(4) |
Mar
(4) |
Apr
(1) |
May
(5) |
Jun
(7) |
Jul
(14) |
Aug
(9) |
Sep
(18) |
Oct
(2) |
Nov
(3) |
Dec
(3) |
2018 |
Jan
(7) |
Feb
(6) |
Mar
(1) |
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
(18) |
Sep
(8) |
Oct
(9) |
Nov
(4) |
Dec
(6) |
2019 |
Jan
(5) |
Feb
|
Mar
(2) |
Apr
(4) |
May
(6) |
Jun
(8) |
Jul
(11) |
Aug
(10) |
Sep
(6) |
Oct
|
Nov
(1) |
Dec
|
2020 |
Jan
(8) |
Feb
(3) |
Mar
(1) |
Apr
(4) |
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
(1) |
Oct
(5) |
Nov
(2) |
Dec
(1) |
2021 |
Jan
|
Feb
|
Mar
(5) |
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(7) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
(5) |
Jul
(15) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
(1) |
Mar
|
Apr
(2) |
May
|
Jun
(5) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Tom W. <to...@ss...> - 2002-01-10 16:42:43
|
In a Jython script, I import a Java class with: from jp import * unfortunately, inside "jp" is a method named "abs" which takes one argument of a highly specialized type (non-python). After this import, if I try to do: abs(3) I get an error that the argument could not be coerced to the "specialized type" required by the "jp.abs()" method. While there are "workarounds" for this (like an explicit "from jp import x,y,z"), I'd like to know if there is anything else I can do so that script-writers won't inadvertantly run into this. I have spoken with the own of the library that "jp" is contained in about simply changing the method names, but any other suggestions would be welcomed. Thanks. tom -- Tom Whittaker University of Wisconsin-Madison Space Science and Eng. Center ph: 608.262.2759 |
From: Humbel O. <Otm...@bi...> - 2002-01-10 09:30:22
|
[ Prathibha ] > I currently use python code(jython actually) which I > retrieve from the DB to compile and interpret it at > runtime. Will using precompiled python scripts in the > DB improve performance significantly? I am asking this > as I am also looking to caching these precompiled > scripts to improve performance as well. That's exactly the way we do it: - the database contains the .py code (as clob) - we use a runtime cache containing precompiled code=20 for the most used scripts This improves performance considerably (I'm sorry I can't give you a percentage - I simply don't know). Below I try to sketch how we do the precompiling.=20 ATTN: This may not be state of the art. I would be really glad if someone knows a better(*) way to do it. Server code: ByteArrayOutputStream outputStream =3D=20 new ByteArrayOutputStream(); ByteArrayInputStream sourceCode =3D=20 new ByteArrayInputStream( scriptData ); String uniqueID =3D "org.python.pycode._py" + scriptID; SimpleNode node =3D=20 parser.parse( sourceCode, "exec", uniqueID, null ); Module.compile( node, outputStream , name, filename,=20 true, false, false, null ); byte[] byteCode =3D outputStream.toByteArray(); This byte array can be transferred from server to client. On the client we make runnable code out of it: byte[] byteCode =3D getByteCodeFromServer( scriptID); String uniqueID =3D "org.python.pycode._py" + scriptID; PyCode currentCode =3D=20 BytecodeLoader.makeCode( uniqueID, byteCode ); and run it as follows: PyObject result =3D Py.runCode( currentCode, locals, globals ); Hopefully this gives you some ideas. I also would also appreciate it if someone knows a better(*) way to precompile if everything takes place in the same JVM. Best wishes, and thanks in advance. Oti. Legend: ------- (*) better: more upwards compatible, more performant more elegant .... |
From: webmaster<NO...@in...> - 2002-01-10 01:58:12
|
<html> <head> <meta http-equiv="content-type" content="text/html; charset=euc-kr"> <title>제목 없음</title> <meta name="generator" content="Namo WebEditor v5.0"> </head> <body bgcolor="white" text="black" link="blue" vlink="purple" alink="red"> <table style="border-collapse:collapse;" cellspacing="0"> <tr> <td width="500" style="border-width:1px; border-color:black; border-style:solid;"> <p><a href="http://dleogh78.com.ne.kr/mail/edu/edu_plan.htm" target="_blank"><img src="http://dleogh78.com.ne.kr/mail/img/main_form.gif" width="500" height="500" border="0"></a></p> </td> </tr> </table> <p> </p> </body> </html> |
From: Prathibha <pr...@ya...> - 2002-01-09 20:58:18
|
I currently use python code(jython actually) which I retrieve from the DB to compile and interpret it at runtime. Will using precompiled python scripts in the DB improve performance significantly? I am asking this as I am also looking to caching these precompiled scripts to improve performance as well. Thanks pratibha __________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ |
From: dman <ds...@ri...> - 2002-01-09 20:28:58
|
On Wed, Jan 09, 2002 at 11:51:06AM -0800, R Datta wrote: | I am working on a jython script that starts multiple threads. The threads | report statistics (like how many transactions per second) to the monitor | thread, ie, each thread would need to lock the statistics variable, update | it and then release the lock. | | Could someone send me some sample code that illustrates how to lock a | variable in jython? import threading lock = threading.Lock() # the lock variable = 1 # the variable # somewhere else lock.acquire() varaible = 2 lock.release() -D -- Be sure of this: The wicked will not go unpunished, but those who are righteous will go free. Proverbs 11:21 |
From: R D. <rd...@cr...> - 2002-01-09 19:53:35
|
I am working on a jython script that starts multiple threads. The threads report statistics (like how many transactions per second) to the monitor thread, ie, each thread would need to lock the statistics variable, update it and then release the lock. Could someone send me some sample code that illustrates how to lock a variable in jython? Thanks Raj Datta Professional Services Direct : 408-530-4932 CrossAccess Corp Cell : 408-316-5473 2900 Gordon Ave #100 Fax : 408-735-0328 Santa Clara CA 95051 Email : rd...@cr... |
From: brian z. <bz...@zi...> - 2002-01-09 18:22:58
|
I just checked in the fix. brian > -----Original Message----- > From: jyt...@li... > [mailto:jyt...@li...] On Behalf > Of Steve Cohen > Sent: Wednesday, January 09, 2002 12:01 PM > To: Finn Bock; jyt...@li... > Cc: brian zimmer > Subject: RE: [Jython-users] More fun with Readline > > > Without the fix that Finn mentions in his bug report, it > doesn't work for me either. > > -----Original Message----- > From: Finn Bock [mailto:bc...@wo...] > Sent: Wednesday, January 09, 2002 11:32 AM > To: jyt...@li... > Cc: brian zimmer > Subject: Re: [Jython-users] More fun with Readline > > > [brian on jy-user] > > >Steve, > > > >I tested isql on my Linux box with the Readline binary from > the url you > >pointed out earlier and was unable to reproduce the exception. > > Even when use_rawinput is 0? > > > > http://sourceforge.net/tracker/index.php?func=detail&aid=49997 3&group_id =12867&atid=112867 I had to change the setup slightly because I don't have a database installed, but I think the exception is real. regards, finn _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Steve C. <St...@ig...> - 2002-01-09 18:01:09
|
Without the fix that Finn mentions in his bug report, it doesn't work for me either. -----Original Message----- From: Finn Bock [mailto:bc...@wo...] Sent: Wednesday, January 09, 2002 11:32 AM To: jyt...@li... Cc: brian zimmer Subject: Re: [Jython-users] More fun with Readline [brian on jy-user] >Steve, > >I tested isql on my Linux box with the Readline binary from the url you >pointed out earlier and was unable to reproduce the exception.=20 Even when use_rawinput is 0? > http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D499973&group= _id =3D12867&atid=3D112867 I had to change the setup slightly because I don't have a database installed, but I think the exception is real. regards, finn _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |
From: <bc...@wo...> - 2002-01-09 17:27:50
|
[brian on jy-user] >Steve, > >I tested isql on my Linux box with the Readline binary from the url you >pointed out earlier and was unable to reproduce the exception. Even when use_rawinput is 0? > http://sourceforge.net/tracker/index.php?func=detail&aid=499973&group_id=12867&atid=112867 I had to change the setup slightly because I don't have a database installed, but I think the exception is real. regards, finn |
From: Jan W. <j.w...@sc...> - 2002-01-08 08:55:03
|
On Mon, Jan 07, 2002 at 01:36:19PM -0800, Lieyong Fu wrote: > Hi, > How do I create .pyc file out of .py file so that .py file is not necce= ssary > sitting on the runtime system. When I used Python (not Jython) .pyc fil= e is > automatically created every time a .py file is compiled. (For example, = when > I do Python myfile.py then there will be mytile.pyc created and myfile.= py > can dispeare unless change is neccessary). In Jython, it doesn't seem t= hat > .pyc file is created. Right. Since Jython is Java-based .class files get created instead. If yo= u want to distribute a non-source form of your program you can use jythonc to co= mpile it into a jar file. Some things are different, e.g. properties, sys.argv[= 0]... Cheerio, --=20 J.W...@sc... - Fon +4970719457-257 Fax-211 science+computing ag - Hagellocher Weg 71-75 - 72070 T=FCbingen Zope appeals to people that have a design brain, and turns off people tha= t just want to be given a printf, thank you very much. (Paul Everitt, Digicool) |
From: Lieyong Fu <LF...@Ce...> - 2002-01-07 21:41:04
|
Hi, How do I create .pyc file out of .py file so that .py file is not neccessary sitting on the runtime system. When I used Python (not Jython) .pyc file is automatically created every time a .py file is compiled. (For example, when I do Python myfile.py then there will be mytile.pyc created and myfile.py can dispeare unless change is neccessary). In Jython, it doesn't seem that .pyc file is created. Thanks, Lieyong |
From: dman <ds...@ri...> - 2002-01-07 19:00:21
|
On Mon, Jan 07, 2002 at 11:20:05AM -0500, Rajarshi Guha wrote: | Hi, | just downloaded Jython and and have compiled one of my .py files to a | .class file with the command: | ../../jython-2.0/jythonc --deep -A org.python.modules xml2.py | | However when I try to run the .class file I get the error: | | Exception in thread "main" java.lang.NoClassDefFoundError: | org/python/core/PyObject | | How can I fix this? Include jython.jar in the CLASSPATH. -D -- Python is executable pseudocode. Perl is executable line noise. |
From: Jan W. <j.w...@sc...> - 2002-01-07 17:06:05
|
On Mon, Jan 07, 2002 at 11:20:05AM -0500, Rajarshi Guha wrote: > Hi, > just downloaded Jython and and have compiled one of my .py files to a= =20 > .class file with the command: > ../../jython-2.0/jythonc --deep -A org.python.modules xml2.py >=20 > However when I try to run the .class file I get the error: >=20 > Exception in thread "main" java.lang.NoClassDefFoundError:=20 > org/python/core/PyObject You need to include the jython.jar in your CLASSPATH, either in the envir= onment or on the commandline. The jython.jar file is located in the jython installation directory, same= place where the jython command lies. Cheerio, --=20 J.W...@sc... - Fon +4970719457-257 Fax-211 science+computing ag - Hagellocher Weg 71-75 - 72070 T=FCbingen A witty saying proves nothing. (Voltaire) |
From: <Dan...@at...> - 2002-01-07 17:03:57
|
Hi all. Last week or so, I asked about strategies for using jython to access COM objects. Various (good) responses came back, and I put them to use. The best suggestion was to use XML-RPC to allow a jython instance (which doesn't support COM) to communicate with a CPython instance (which does support COM). Here's a cutesy demo that runs a Microsoft Agent (one of their little anthropomorphs like the MSOffice paper clips) from a JavaAwt controller. The in-machine protocol is XML-RPC. (Apologies for any damage to the source done by my mailer program.) Windows 2000 should have at least one agent character (Merlin.acs) installed in <root-drive>:\WINNT\MSAGENT\CHARS 1). here's the Server side which should be run from CPython: _________________ CUT HERE__________________________ # Run this under Python21 with the XMLRPC lib stuff inserted into PythonPath # must have installed ActiveState Python (ActivePython- 2.1.1.msi)and win32all.exe from win32com.client import * import SimpleXMLRPCServer import os,sys,time,string class Anthropomorph: def __init__ (self, agent="Merlin"): self.agentName=agent def initAgent(self): self.dispatchID = Dispatch ("Agent.Control.2") # load the control self.dispatchID.Connected=1 # Connect! fullName = self.agentName+'.acs' print "initAgent",fullName self.dispatchID.Characters.Load (self.agentName, fullName) self.anAgent = self.dispatchID.Characters (self.agentName) #print "initAgent", self.anAgent return "Anthropomorph: initAgent done." def startAgent (self): print "startAgent",self.anAgent self.anAgent.Show() self.anAgent.Play("Greet") self.anAgent.MoveTo(820,600,1000) time.sleep(5) # padding so that the anthropomorph can perform return "Anthropomorph: startAgent done." def play(self, gesture, delay=5): print "play",self.anAgent self.anAgent.Play(gesture) time.sleep(delay) # padding so that the anthropomorph can perform return delay def say (self, phrase, delay=5): print "say",self.anAgent self.anAgent.Speak(phrase) time.sleep(delay) # padding so that the anthropomorph can perform return delay def hide(self, delay=0): time.sleep(delay) # padding so that the anthropomorph can perform self.anAgent.Hide() return delay server = SimpleXMLRPCServer.SimpleXMLRPCServer (("localhost", 8000)) server.register_instance(Anthropomorph()) print 'SimpleXMLRPCServer @ localhost:8000' server.serve_forever() _____________________ END SERVER CODE______________ 2). Client Code, simply creates an awt fixture and communicates with the Server. run this with jython __________________ CUT HERE_________________________ # Client code import xmlrpclib from java import awt class Marionette: def __init__(self): self.agent = xmlrpclib.Server ('http://localhost:8000') print self.agent.initAgent() print self.agent.startAgent() def saySomething(self,anExpression): self.agent.say(anExpression) def doSomething(self,anAction): self.agent.play(anAction) def hideMe(self): self.agent.hide() if __name__ == '__main__': def animate(e): #print 'animate called' animation.caretPosition=0 #animation.selectAll() puppet.doSomething(animation.getText()) def speak(e): #print 'speak called' speech.caretPosition=0 #speech.selectAll() puppet.saySomething(speech.getText()) puppet = Marionette() panel0= awt.Panel(layout=awt.BorderLayout()) panel1= awt.Panel(layout=awt.GridLayout()) label0 = awt.Label('Animation:') animation = awt.TextField(text='Greet', actionPerformed=animate) label1 = awt.Label("Say This:") speech = awt.TextField(text='Hello Folks', actionPerformed=speak) panel1.add(label0) panel1.add(animation) panel1.add(label1) panel1.add(speech) panel0.add(panel1, 'Center') import pawt pawt.test(panel0, size=(300,56)) animate(None) ____________________________________________________ -- _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ Dana Moore - BBN Technologies 703.284.4740 (W) 240.350.4196 (M) dan...@at... _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ |
From: Rajarshi G. <raj...@pr...> - 2002-01-07 16:18:54
|
Hi, just downloaded Jython and and have compiled one of my .py files to a .class file with the command: ../../jython-2.0/jythonc --deep -A org.python.modules xml2.py However when I try to run the .class file I get the error: Exception in thread "main" java.lang.NoClassDefFoundError: org/python/core/PyObject How can I fix this? TIA, -- ------------------------------------------------------------------- Rajarshi Guha | email: raj...@pr... 417 Davey Laboratory | web : www.jijo.cjb.net Department of Chemistry | www.rajarshi.outputto.com Pennsylvania State University | ICQ : 123242928 | AIM : LoverOfPanda ------------------------------------------------------------------- GPG Fingerprint: DCCB 4D1A 5A8B 2F5A B5F6 1F9E CDC4 5574 9017 AF2A Public Key : http://pgp.mit.edu/ ------------------------------------------------------------------- A committee is a life form with six or more legs and no brain. -- Lazarus Long, "Time Enough For Love" |
From: brian z. <bz...@zi...> - 2002-01-07 05:32:06
|
I would ask on comp.lang.python about the preferred method of patching. Conditionals are used in a number of places to determine the correct behaviour on a particular os. A quick grep of the Python 2.2 Lib shows at a minimum 29 occurences of 'if os.name == X' so it appears to be a viable solution. brian > -----Original Message----- > From: Steve Cohen > [mailto:jyt...@li...] On Behalf > Of Steve Cohen > Sent: Sunday, January 06, 2002 11:19 PM > To: brian zimmer; Finn Bock; jyt...@li... > Subject: RE: [Jython-users] More fun with Readline > > > Hmm, that won't work with my current implementation. My > current implementation is importing java classes. > > In two places. In one I am importing PySystemState to read > the registry. Is there an all-python way to read the > registry or its properties without referencing jython? If > so, I can avoid that import. > > The other is where I'm importing org.gnu.readline.Readline. > This seems to be essential. I can probably put the import > into a conditional code block that would never be met by > CPython users but would that be "clean" enough? > > What is standard practice around issues of this type? > > Steve > > > > > > -----Original Message----- > From: brian zimmer > Sent: Sun 1/6/2002 10:36 PM > To: Steve Cohen; 'Finn Bock'; jyt...@li... > Cc: > Subject: RE: [Jython-users] More fun with Readline > Steve, > > The majority of the python modules in Lib are copied from the > same version of the CPython distribution. Only when the > module is new and jython-centric (jreload, dbexts) or > drastically differs (string, socket) does it get checked into > Jython's CVS. > > For both development and production, I point at the current > Jython Lib and then the same version of CPython's Lib. This > makes sure I pick any Jython specific modules first before > trying to load the standard Python distribution's modules. > > For something like cmd.py, it's probably best to work with > the CPython version and submit your patch there along with > the explanation for why it is needed. Some CPython modules > check for os.name == 'java' > (unittest) and do something accordingly. > > Along this note, there was a change to string.py in CPython > 2.2 that includes three attributes not found in the Jython > version currently in > CVS: > > # not set to 'lowercase' or 'uppercase' because they can > change ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz' > ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' ascii_letters > = ascii_lowercase + ascii_uppercase > > Without them, the 2.2 version of cmd.py from (CPython) will > not work when imported from Jython 2.1+. I'm going to raise > a bug and provide the patch but you can paste these in your > local Jython version of string.py in the interim. > > Hope this helps. > > brian > > > > -----Original Message----- > > From: Steve Cohen > > [mailto:jyt...@li...] On Behalf > > Of Steve Cohen > > Sent: Sunday, January 06, 2002 9:58 PM > > To: Steve Cohen; Finn Bock; jyt...@li... > > Subject: RE: [Jython-users] More fun with Readline > > > > > > Well, I developed what I thought was a nice integration of > > readline into cmd.py. It worked perfectly and it made no > > assumptions about the presence or absence of readline. > > > > I started preparing a patch file. It involved a few of the > > java classes and cmd.py. All was going well and then I > > noticed that cmd.py was NOT in CVS. Where did it come from > > then? It must have come from the installation. From the > > docs I see that it may have come originally from CPython. > > OK, so what does this mean? Does it mean that my changes > > also have to work in CPython? > > > > I'm confused. > > > > > > -----Original Message----- > > From: Steve Cohen on behalf of Steve Cohen > > Sent: Sat 1/5/2002 6:28 PM > > To: Finn Bock; jyt...@li... > > Cc: > > Subject: RE: [Jython-users] More fun with Readline > > OK. On one level getting cmd.Cmd to use the readline is > > easy. Just import org.gnu.readline.Readline and I'm on my > > way. It works exactly as I want it to work. > > > > But of course, that won't do, since org.gnu.readline is > > optional. What I'd like to do is somehow grab the "interp" > > InteractiveConsole that is created in jython.main() and call > > IT'S raw_input method. But I don't see a way to do this. > > interp is a local variable to the main method. Is there some > > behind the scenes way I can hook this, to take advantage of > > its readline capabilities? That seems like the "right" way > > to do this, but is there a way to do it short of modifying > > jython.java? Seems kind of an extreme step for my first > > attempt to fix something in jython. > > > > > > -----Original Message----- > > From: Finn Bock > > Sent: Sat 1/5/2002 4:11 PM > > To: jyt...@li... > > Cc: Steve Cohen > > Subject: Re: [Jython-users] More fun with Readline > > [Steve Cohen] > > > > >There is a stack trace and it's the same whether or not > > >showJavaExceptions is true: > > > > That is OK. Thanks. > > > > >[scohen@sleepingbear scohen]$ jython > > >-Dpython.options.showJavaExceptions=3Dtrue > > >Jython 2.1 on java1.3.0 (JIT: null) > > >Type "copyright", "credits" or "license" for more information. > > >>>> import dbexts, isql > > >>>> d=3Ddbexts.dbexts("prod_sport") > > >>>> D=3Disql.IsqlCmd(d) > > >>>> D.use_rawinput=3D0 > > >>>> D.cmdloop() > > >Traceback (innermost last): > > > File "<console>", line 1, in ? > > > File "/usr/local/jython/jython-2.1/Lib/cmd.py", line 79, > in cmdloop > > >TypeError: write(): 1st arg can't be coerced to String > > > > Not quite the error situation that I expected, but that just > > goes to show how important the context is. I have added a bug > > report about the situation. > > > > >The 1st arg is None, which is arguably a bug in isql.IsqlCmd. > > > > Are you absolutely sure that self.prompt is None. AFAICT > > D.prompt should be an instance of the Prompt class and that > > will cause the stacktrace above. A None value will cause a > > NPE which is a different bug. Please recheck the value of D.prompt. > > > > >The code > > >in cmdloop can't handle it (can't coerce it to String). I can work > > >around the bug by explicitly setting D.prompt (which is the first > > >argument passed in) before executing D.cmdloop() but then > > you are quite > > >right, there still isn't support for any form of readline, > > either the > > >java_readline that is in the interactive mode or even the Ctrl-N, > > >Ctrl-P stuff that the documentation speaks of. > > > > > >I suppose I could take a look at fixing this, although I'm not > > >extremely familiar with it. If you could point me to where the > > >java_readline stuff is integrated into the interactive > mode, I could > > >have a go at it. > > > > That code is located in org\python\util\ReadlineConsole.java. > > > > >Or, if you'd rather have someone more familiar with the > internals do > > >it, I certainly understand. > > > > Well, I prefer that it is implemented by someone who really > > want it to work. If you decide to try, feel free to ask > > questions and seek advice on jython-dev. > > > > regards, > > finn > > > > > > > > > > > > |
From: brian z. <bz...@zi...> - 2002-01-07 05:28:01
|
Steve, I tested isql on my Linux box with the Readline binary from the url you pointed out earlier and was unable to reproduce the exception. I see that cmd.py doesn't work with the Readline console, but I don't get any exceptions. I tested this with the latest CVS (2.1+) and Python 2.2 Lib. In addition, I checked in a new version of isql but I doubt that would have fixed this. brian > -----Original Message----- > From: Steve Cohen > [mailto:jyt...@li...] On Behalf > Of Steve Cohen > Sent: Saturday, January 05, 2002 8:53 AM > To: Finn Bock; jyt...@li... > Subject: RE: [Jython-users] More fun with Readline > > > There is a stack trace and it's the same whether or not > showJavaExceptions is true: > > [scohen@sleepingbear scohen]$ jython > -Dpython.options.showJavaExceptions=true > Jython 2.1 on java1.3.0 (JIT: null) > Type "copyright", "credits" or "license" for more information. > >>> import dbexts, isql > >>> d=dbexts.dbexts("prod_sport") > >>> D=isql.IsqlCmd(d) > >>> D.use_rawinput=0 > >>> D.cmdloop() > Traceback (innermost last): > File "<console>", line 1, in ? > File "/usr/local/jython/jython-2.1/Lib/cmd.py", line 79, in cmdloop > TypeError: write(): 1st arg can't be coerced to String > > The 1st arg is None, which is arguably a bug in isql.IsqlCmd. > The code in cmdloop can't handle it (can't coerce it to > String). I can work around the bug by explicitly setting > D.prompt (which is the first argument passed in) before > executing D.cmdloop() but then you are quite right, there > still isn't support for any form of readline, either the > java_readline that is in the interactive mode or even the > Ctrl-N, Ctrl-P stuff that the documentation speaks of. > > I suppose I could take a look at fixing this, although I'm > not extremely familiar with it. If you could point me to > where the java_readline stuff is integrated into the > interactive mode, I could have a go at it. Or, if you'd > rather have someone more familiar with the internals do it, I > certainly understand. > > > -----Original Message----- > From: Finn Bock > Sent: Sat 1/5/2002 7:44 AM > To: jyt...@li... > Cc: Steve Cohen > Subject: Re: [Jython-users] More fun with Readline > [Steve Cohen] > > >Now that I have readline working with jython, I come quickly to the > >next hurdle. Is it possible to integrate readline capabilities into > >jython-coded command interpreters based on cmd.Cmd? I > cannot get this > >to work at all. The docs on cmd.Cmd gave me some hope, but > I can't get > >any of it to work, not even the Ctrl-P, Ctrl-N stuff. I also tried > >setting use_rawinput to 0 to force readline, that produced an error > >when I executed cmdloop():=20 > > > >TypeError: write(): 1st arg can't be coerced to String > > Was there a stacktrace with that exception? > > It is not uncommon that TypeErrors are caused by a too > restrictive method signature in the jython core, but more > information is needed. Also try to start jython with the command: > > jython -Dpython.options.showJavaExceptions=true > > to get additional stacktrace information. > > >Does anyone have any ideas how readline can be made to work > in cmd.Cmd > >interpreters? > > I doubt that it works at the moment. raw_input() just call the > .readline() method on sys.stdin. > > Someone have to add support for readline in __builtin__.raw_input(). > > Anyone? > > regards, > finn > > > |
From: Steve C. <St...@ig...> - 2002-01-07 05:18:41
|
Hmm, that won't work with my current implementation. My current implementation is importing java classes. In two places. In one I am importing PySystemState to read the registry. Is there an all-python way to read the registry or its properties without referencing jython? If so, I can avoid that import. The other is where I'm importing org.gnu.readline.Readline. This seems to be essential. I can probably put the import into a conditional code block that would never be met by CPython users but would that be "clean" enough? What is standard practice around issues of this type? Steve -----Original Message----- From: brian zimmer Sent: Sun 1/6/2002 10:36 PM To: Steve Cohen; 'Finn Bock'; jyt...@li... Cc:=09 Subject: RE: [Jython-users] More fun with Readline Steve, The majority of the python modules in Lib are copied from the same version of the CPython distribution. Only when the module is new and jython-centric (jreload, dbexts) or drastically differs (string, socket) does it get checked into Jython's CVS. For both development and production, I point at the current Jython Lib and then the same version of CPython's Lib. This makes sure I pick any Jython specific modules first before trying to load the standard Python distribution's modules. For something like cmd.py, it's probably best to work with the CPython version and submit your patch there along with the explanation for why it is needed. Some CPython modules check for os.name =3D=3D 'java' (unittest) and do something accordingly. Along this note, there was a change to string.py in CPython 2.2 that includes three attributes not found in the Jython version currently in CVS: # not set to 'lowercase' or 'uppercase' because they can change ascii_lowercase =3D 'abcdefghijklmnopqrstuvwxyz' ascii_uppercase =3D 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' ascii_letters =3D ascii_lowercase + ascii_uppercase Without them, the 2.2 version of cmd.py from (CPython) will not work when imported from Jython 2.1+. I'm going to raise a bug and provide the patch but you can paste these in your local Jython version of string.py in the interim. Hope this helps. brian > -----Original Message----- > From: Steve Cohen=20 > [mailto:jyt...@li...] On Behalf=20 > Of Steve Cohen > Sent: Sunday, January 06, 2002 9:58 PM > To: Steve Cohen; Finn Bock; jyt...@li... > Subject: RE: [Jython-users] More fun with Readline >=20 >=20 > Well, I developed what I thought was a nice integration of=20 > readline into cmd.py. It worked perfectly and it made no=20 > assumptions about the presence or absence of readline. =20 >=20 > I started preparing a patch file. It involved a few of the=20 > java classes and cmd.py. All was going well and then I=20 > noticed that cmd.py was NOT in CVS. Where did it come from=20 > then? It must have come from the installation. From the=20 > docs I see that it may have come originally from CPython. =20 > OK, so what does this mean? Does it mean that my changes=20 > also have to work in CPython? >=20 > I'm confused.=20 >=20 >=20 > -----Original Message----- > From: Steve Cohen on behalf of Steve Cohen > Sent: Sat 1/5/2002 6:28 PM > To: Finn Bock; jyt...@li... > Cc:=09 > Subject: RE: [Jython-users] More fun with Readline > OK. On one level getting cmd.Cmd to use the readline is=20 > easy. Just import org.gnu.readline.Readline and I'm on my=20 > way. It works exactly as I want it to work. >=20 > But of course, that won't do, since org.gnu.readline is=20 > optional. What I'd like to do is somehow grab the "interp"=20 > InteractiveConsole that is created in jython.main() and call=20 > IT'S raw_input method. But I don't see a way to do this. =20 > interp is a local variable to the main method. Is there some=20 > behind the scenes way I can hook this, to take advantage of=20 > its readline capabilities? That seems like the "right" way=20 > to do this, but is there a way to do it short of modifying=20 > jython.java? Seems kind of an extreme step for my first=20 > attempt to fix something in jython. >=20 >=20 > -----Original Message----- > From: Finn Bock > Sent: Sat 1/5/2002 4:11 PM > To: jyt...@li... > Cc: Steve Cohen > Subject: Re: [Jython-users] More fun with Readline > [Steve Cohen] >=20 > >There is a stack trace and it's the same whether or not=20 > >showJavaExceptions is true: >=20 > That is OK. Thanks. >=20 > >[scohen@sleepingbear scohen]$ jython=20 > >-Dpython.options.showJavaExceptions=3D3Dtrue > >Jython 2.1 on java1.3.0 (JIT: null) > >Type "copyright", "credits" or "license" for more information. > >>>> import dbexts, isql > >>>> d=3D3Ddbexts.dbexts("prod_sport") > >>>> D=3D3Disql.IsqlCmd(d) > >>>> D.use_rawinput=3D3D0 > >>>> D.cmdloop() > >Traceback (innermost last): > > File "<console>", line 1, in ? > > File "/usr/local/jython/jython-2.1/Lib/cmd.py", line 79, in cmdloop > >TypeError: write(): 1st arg can't be coerced to String >=20 > Not quite the error situation that I expected, but that just=20 > goes to show how important the context is. I have added a bug=20 > report about the situation. >=20 > >The 1st arg is None, which is arguably a bug in isql.IsqlCmd. >=20 > Are you absolutely sure that self.prompt is None. AFAICT=20 > D.prompt should be an instance of the Prompt class and that=20 > will cause the stacktrace above. A None value will cause a=20 > NPE which is a different bug. Please recheck the value of D.prompt. >=20 > >The code > >in cmdloop can't handle it (can't coerce it to String). I can work=20 > >around the bug by explicitly setting D.prompt (which is the first=20 > >argument passed in) before executing D.cmdloop() but then=20 > you are quite=20 > >right, there still isn't support for any form of readline,=20 > either the=20 > >java_readline that is in the interactive mode or even the Ctrl-N,=20 > >Ctrl-P stuff that the documentation speaks of. > > > >I suppose I could take a look at fixing this, although I'm not=20 > >extremely familiar with it. If you could point me to where the=20 > >java_readline stuff is integrated into the interactive mode, I could=20 > >have a go at it. >=20 > That code is located in org\python\util\ReadlineConsole.java.=20 >=20 > >Or, if you'd rather have someone more familiar with the internals do=20 > >it, I certainly understand. >=20 > Well, I prefer that it is implemented by someone who really=20 > want it to work. If you decide to try, feel free to ask=20 > questions and seek advice on jython-dev. >=20 > regards, > finn >=20 >=20 >=20 >=20 |
From: brian z. <bz...@zi...> - 2002-01-07 04:37:18
|
Steve, The majority of the python modules in Lib are copied from the same version of the CPython distribution. Only when the module is new and jython-centric (jreload, dbexts) or drastically differs (string, socket) does it get checked into Jython's CVS. For both development and production, I point at the current Jython Lib and then the same version of CPython's Lib. This makes sure I pick any Jython specific modules first before trying to load the standard Python distribution's modules. For something like cmd.py, it's probably best to work with the CPython version and submit your patch there along with the explanation for why it is needed. Some CPython modules check for os.name == 'java' (unittest) and do something accordingly. Along this note, there was a change to string.py in CPython 2.2 that includes three attributes not found in the Jython version currently in CVS: # not set to 'lowercase' or 'uppercase' because they can change ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz' ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' ascii_letters = ascii_lowercase + ascii_uppercase Without them, the 2.2 version of cmd.py from (CPython) will not work when imported from Jython 2.1+. I'm going to raise a bug and provide the patch but you can paste these in your local Jython version of string.py in the interim. Hope this helps. brian > -----Original Message----- > From: Steve Cohen > [mailto:jyt...@li...] On Behalf > Of Steve Cohen > Sent: Sunday, January 06, 2002 9:58 PM > To: Steve Cohen; Finn Bock; jyt...@li... > Subject: RE: [Jython-users] More fun with Readline > > > Well, I developed what I thought was a nice integration of > readline into cmd.py. It worked perfectly and it made no > assumptions about the presence or absence of readline. > > I started preparing a patch file. It involved a few of the > java classes and cmd.py. All was going well and then I > noticed that cmd.py was NOT in CVS. Where did it come from > then? It must have come from the installation. From the > docs I see that it may have come originally from CPython. > OK, so what does this mean? Does it mean that my changes > also have to work in CPython? > > I'm confused. > > > -----Original Message----- > From: Steve Cohen on behalf of Steve Cohen > Sent: Sat 1/5/2002 6:28 PM > To: Finn Bock; jyt...@li... > Cc: > Subject: RE: [Jython-users] More fun with Readline > OK. On one level getting cmd.Cmd to use the readline is > easy. Just import org.gnu.readline.Readline and I'm on my > way. It works exactly as I want it to work. > > But of course, that won't do, since org.gnu.readline is > optional. What I'd like to do is somehow grab the "interp" > InteractiveConsole that is created in jython.main() and call > IT'S raw_input method. But I don't see a way to do this. > interp is a local variable to the main method. Is there some > behind the scenes way I can hook this, to take advantage of > its readline capabilities? That seems like the "right" way > to do this, but is there a way to do it short of modifying > jython.java? Seems kind of an extreme step for my first > attempt to fix something in jython. > > > -----Original Message----- > From: Finn Bock > Sent: Sat 1/5/2002 4:11 PM > To: jyt...@li... > Cc: Steve Cohen > Subject: Re: [Jython-users] More fun with Readline > [Steve Cohen] > > >There is a stack trace and it's the same whether or not > >showJavaExceptions is true: > > That is OK. Thanks. > > >[scohen@sleepingbear scohen]$ jython > >-Dpython.options.showJavaExceptions=3Dtrue > >Jython 2.1 on java1.3.0 (JIT: null) > >Type "copyright", "credits" or "license" for more information. > >>>> import dbexts, isql > >>>> d=3Ddbexts.dbexts("prod_sport") > >>>> D=3Disql.IsqlCmd(d) > >>>> D.use_rawinput=3D0 > >>>> D.cmdloop() > >Traceback (innermost last): > > File "<console>", line 1, in ? > > File "/usr/local/jython/jython-2.1/Lib/cmd.py", line 79, in cmdloop > >TypeError: write(): 1st arg can't be coerced to String > > Not quite the error situation that I expected, but that just > goes to show how important the context is. I have added a bug > report about the situation. > > >The 1st arg is None, which is arguably a bug in isql.IsqlCmd. > > Are you absolutely sure that self.prompt is None. AFAICT > D.prompt should be an instance of the Prompt class and that > will cause the stacktrace above. A None value will cause a > NPE which is a different bug. Please recheck the value of D.prompt. > > >The code > >in cmdloop can't handle it (can't coerce it to String). I can work > >around the bug by explicitly setting D.prompt (which is the first > >argument passed in) before executing D.cmdloop() but then > you are quite > >right, there still isn't support for any form of readline, > either the > >java_readline that is in the interactive mode or even the Ctrl-N, > >Ctrl-P stuff that the documentation speaks of. > > > >I suppose I could take a look at fixing this, although I'm not > >extremely familiar with it. If you could point me to where the > >java_readline stuff is integrated into the interactive mode, I could > >have a go at it. > > That code is located in org\python\util\ReadlineConsole.java. > > >Or, if you'd rather have someone more familiar with the internals do > >it, I certainly understand. > > Well, I prefer that it is implemented by someone who really > want it to work. If you decide to try, feel free to ask > questions and seek advice on jython-dev. > > regards, > finn > > > > |
From: Steve C. <St...@ig...> - 2002-01-07 03:57:48
|
Well, I developed what I thought was a nice integration of readline into cmd.py. It worked perfectly and it made no assumptions about the presence or absence of readline. =20 I started preparing a patch file. It involved a few of the java classes and cmd.py. All was going well and then I noticed that cmd.py was NOT in CVS. Where did it come from then? It must have come from the installation. From the docs I see that it may have come originally from CPython. OK, so what does this mean? Does it mean that my changes also have to work in CPython? I'm confused.=20 -----Original Message----- From: Steve Cohen on behalf of Steve Cohen Sent: Sat 1/5/2002 6:28 PM To: Finn Bock; jyt...@li... Cc:=09 Subject: RE: [Jython-users] More fun with Readline OK. On one level getting cmd.Cmd to use the readline is easy. Just import org.gnu.readline.Readline and I'm on my way. It works exactly as I want it to work. But of course, that won't do, since org.gnu.readline is optional. What I'd like to do is somehow grab the "interp" InteractiveConsole that is created in jython.main() and call IT'S raw_input method. But I don't see a way to do this. interp is a local variable to the main method. Is there some behind the scenes way I can hook this, to take advantage of its readline capabilities? That seems like the "right" way to do this, but is there a way to do it short of modifying jython.java? Seems kind of an extreme step for my first attempt to fix something in jython. -----Original Message----- From: Finn Bock Sent: Sat 1/5/2002 4:11 PM To: jyt...@li... Cc: Steve Cohen Subject: Re: [Jython-users] More fun with Readline [Steve Cohen] >There is a stack trace and it's the same whether or not >showJavaExceptions is true: That is OK. Thanks. >[scohen@sleepingbear scohen]$ jython >-Dpython.options.showJavaExceptions=3D3Dtrue >Jython 2.1 on java1.3.0 (JIT: null) >Type "copyright", "credits" or "license" for more information. >>>> import dbexts, isql >>>> d=3D3Ddbexts.dbexts("prod_sport") >>>> D=3D3Disql.IsqlCmd(d) >>>> D.use_rawinput=3D3D0 >>>> D.cmdloop() >Traceback (innermost last): > File "<console>", line 1, in ? > File "/usr/local/jython/jython-2.1/Lib/cmd.py", line 79, in cmdloop >TypeError: write(): 1st arg can't be coerced to String Not quite the error situation that I expected, but that just goes to show how important the context is. I have added a bug report about the situation. >The 1st arg is None, which is arguably a bug in isql.IsqlCmd.=20 Are you absolutely sure that self.prompt is None. AFAICT D.prompt should be an instance of the Prompt class and that will cause the stacktrace above. A None value will cause a NPE which is a different bug. Please recheck the value of D.prompt. >The code >in cmdloop can't handle it (can't coerce it to String). I can work >around the bug by explicitly setting D.prompt (which is the first >argument passed in) before executing D.cmdloop() but then you are quite >right, there still isn't support for any form of readline, either the >java_readline that is in the interactive mode or even the Ctrl-N, Ctrl-P >stuff that the documentation speaks of. > >I suppose I could take a look at fixing this, although I'm not extremely >familiar with it. If you could point me to where the java_readline >stuff is integrated into the interactive mode, I could have a go at it. That code is located in org\python\util\ReadlineConsole.java.=20 >Or, if you'd rather have someone more familiar with the internals do it, >I certainly understand. Well, I prefer that it is implemented by someone who really want it to work. If you decide to try, feel free to ask questions and seek advice on jython-dev. regards, finn |
From: dman <ds...@ri...> - 2002-01-06 21:15:35
|
On Sun, Jan 06, 2002 at 03:04:54PM -0600, Steve Cohen wrote: | Anyone have any ideas as to why the jython build process is not working | for me: | | (Note - this build is done on an absolutely clean cvs checkout of the | full jython source. The problem is that in preparation for moving to version 2.2 the CVS sources are broken right now. Finn announced it today on jython-dev. The (j|cp)ython 2.1 version of SRE is a version mismatch, and the cpython 2.2 modules require new stuff like generators and the 'object', etc, classes. If you want stuff more recent that the last 2.1 release you should find out when the 2.2 modules were moved into cvs and get from a date earlier than that. (or just finish jython 2.2 ;-)) -D -- He who finds a wife finds what is good and receives favor from the Lord. Proverbs 18:22 |
From: Steve C. <St...@ig...> - 2002-01-06 21:04:40
|
Anyone have any ideas as to why the jython build process is not working for me: (Note - this build is done on an absolutely clean cvs checkout of the full jython source. The only file changed is the ant.properties file modified to specify the outside jars.) Although the build succeeds, after deploying the jar, I get this error message: [root@sleepingbear jython-2.1]# jython Jython 2.1+ on java1.3.0 (JIT: null) error importing site Traceback (innermost last): File "/usr/local/jython/jython-2.1/Lib/site.py", line 62, in ? File "/usr/local/jython/jython-2.1/Lib/javaos.py", line 32, in ? File "/usr/local/jython/jython-2.1/Lib/re.py", line 7, in ? File "/usr/local/jython/jython-2.1/Lib/sre.py", line 17, in ? File "/usr/local/jython/jython-2.1/Lib/sre_compile.py", line 15, in ? AssertionError: SRE module mismatch Here is the output of the build: [scohen@sleepingbear jython]$ ant clean jar ANT_HOME=3D/home/scohen/jakarta-ant/dist Buildfile: build.xml init: [echo] --- Build environment for jython --- [echo] --- Flags (Note: If the {property name} is displayed, [echo] --- then the component is not present) [echo]=20 [echo] --- Optional Libraries --- [echo] java2 coll =3D true [echo] servlet =3D true [echo] readline =3D true [echo] oracle =3D ${oracle.present} [echo] informix =3D true [echo] mysql =3D ${mysql.present} [echo] postgresql =3D ${postgresql.present} [echo] jndi =3D true [echo] jdbc =3D true clean: [delete] Deleting directory /home/scohen/jython/build [delete] Deleting: /home/scohen/jython/org/python/parser/python.jj [delete] Deleting: /home/scohen/jython/org/python/parser/PythonGrammar.java [delete] Deleting: /home/scohen/jython/org/python/parser/PythonGrammarConstants.java [delete] Deleting: /home/scohen/jython/org/python/parser/PythonGrammarTokenManager.java [delete] Deleting: /home/scohen/jython/org/python/parser/PythonGrammarTreeConstants.java [delete] Deleting: /home/scohen/jython/org/python/parser/Node.java [delete] Deleting: /home/scohen/jython/org/python/parser/Token.java [delete] Deleting: /home/scohen/jython/org/python/parser/JJTPythonGrammarState.java init: [available] DEPRECATED - <available> used to overide an existing property.=20 Build writer should not reuse the same property name for=20 different values. [available] DEPRECATED - <available> used to overide an existing property.=20 Build writer should not reuse the same property name for=20 different values. [available] DEPRECATED - <available> used to overide an existing property.=20 Build writer should not reuse the same property name for=20 different values. [available] DEPRECATED - <available> used to overide an existing property.=20 Build writer should not reuse the same property name for=20 different values. [available] DEPRECATED - <available> used to overide an existing property.=20 Build writer should not reuse the same property name for=20 different values. [available] DEPRECATED - <available> used to overide an existing property.=20 Build writer should not reuse the same property name for=20 different values. [available] DEPRECATED - <available> used to overide an existing property.=20 Build writer should not reuse the same property name for=20 different values. [available] DEPRECATED - <available> used to overide an existing property.=20 Build writer should not reuse the same property name for=20 different values. [available] DEPRECATED - <available> used to overide an existing property.=20 Build writer should not reuse the same property name for=20 different values. [available] DEPRECATED - <available> used to overide an existing property.=20 Build writer should not reuse the same property name for=20 different values. [echo] --- Build environment for jython --- [echo] --- Flags (Note: If the {property name} is displayed, [echo] --- then the component is not present) [echo]=20 [echo] --- Optional Libraries --- [echo] java2 coll =3D true [echo] servlet =3D true [echo] readline =3D true [echo] oracle =3D ${oracle.present} [echo] informix =3D true [echo] mysql =3D ${mysql.present} [echo] postgresql =3D ${postgresql.present} [echo] jndi =3D true [echo] jdbc =3D true prepare: [mkdir] Created dir: /home/scohen/jython/build tree: [jjtree] Java Compiler Compiler Version 2.1 (Tree Builder) [jjtree] Copyright (c) 1996-2001 Sun Microsystems, Inc. [jjtree] Copyright (c) 1997-2001 WebGain, Inc. [jjtree] (type "jjtree" with no arguments for help) [jjtree] Reading from file /home/scohen/jython/org/python/parser/python.jjt . . . [jjtree] File "/home/scohen/jython/org/python/parser/Node.java" does not exist. Will create one. [jjtree] Annotated grammar generated successfully in /home/scohen/jython/org/python/parser/python.jj parser: [javacc] Java Compiler Compiler Version 2.1 (Parser Generator) [javacc] Copyright (c) 1996-2001 Sun Microsystems, Inc. [javacc] Copyright (c) 1997-2001 WebGain, Inc. [javacc] (type "javacc" with no arguments for help) [javacc] Reading from file /home/scohen/jython/org/python/parser/python.jj . . . [javacc] Note: UNICODE_INPUT option is specified. Please make sure you create the parser/lexer usig a Reader with the correct character encoding. [javacc] Warning: TokenMgrError.java: File is obsolete. Please rename or delete this file so that a new one can be generated for you. [javacc] File "Token.java" does not exist. Will create one. [javacc] Parser generated with 0 errors and 3 warnings. [javacc] Warning: ParseException.java: File is obsolete. Please rename or delete this file so that a new one can be generated for you. [javacc] Warning: CharStream.java: File is obsolete. Please rename or delete this file so that a new one can be generated for you. compile: [javac] Compiling 220 source files to /home/scohen/jython/build [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -deprecation for details. [javac] Compiling 5 source files to /home/scohen/jython/build [copy] Copying 1 file to /home/scohen/jython/build/org/python/modules [copy] Copying 1 file to /home/scohen/jython/build/com jar: [jar] DEPRECATED - The jarfile attribute is deprecated. Use file attribute instead. [jar] Building jar: /home/scohen/jython/jython.jar BUILD SUCCESSFUL Total time: 29 seconds |
From: Steve C. <St...@ig...> - 2002-01-06 00:28:22
|
OK. On one level getting cmd.Cmd to use the readline is easy. Just import org.gnu.readline.Readline and I'm on my way. It works exactly as I want it to work. But of course, that won't do, since org.gnu.readline is optional. What I'd like to do is somehow grab the "interp" InteractiveConsole that is created in jython.main() and call IT'S raw_input method. But I don't see a way to do this. interp is a local variable to the main method. Is there some behind the scenes way I can hook this, to take advantage of its readline capabilities? That seems like the "right" way to do this, but is there a way to do it short of modifying jython.java? Seems kind of an extreme step for my first attempt to fix something in jython. -----Original Message----- From: Finn Bock Sent: Sat 1/5/2002 4:11 PM To: jyt...@li... Cc: Steve Cohen Subject: Re: [Jython-users] More fun with Readline [Steve Cohen] >There is a stack trace and it's the same whether or not >showJavaExceptions is true: That is OK. Thanks. >[scohen@sleepingbear scohen]$ jython >-Dpython.options.showJavaExceptions=3D3Dtrue >Jython 2.1 on java1.3.0 (JIT: null) >Type "copyright", "credits" or "license" for more information. >>>> import dbexts, isql >>>> d=3D3Ddbexts.dbexts("prod_sport") >>>> D=3D3Disql.IsqlCmd(d) >>>> D.use_rawinput=3D3D0 >>>> D.cmdloop() >Traceback (innermost last): > File "<console>", line 1, in ? > File "/usr/local/jython/jython-2.1/Lib/cmd.py", line 79, in cmdloop >TypeError: write(): 1st arg can't be coerced to String Not quite the error situation that I expected, but that just goes to show how important the context is. I have added a bug report about the situation. >The 1st arg is None, which is arguably a bug in isql.IsqlCmd.=20 Are you absolutely sure that self.prompt is None. AFAICT D.prompt should be an instance of the Prompt class and that will cause the stacktrace above. A None value will cause a NPE which is a different bug. Please recheck the value of D.prompt. >The code >in cmdloop can't handle it (can't coerce it to String). I can work >around the bug by explicitly setting D.prompt (which is the first >argument passed in) before executing D.cmdloop() but then you are quite >right, there still isn't support for any form of readline, either the >java_readline that is in the interactive mode or even the Ctrl-N, Ctrl-P >stuff that the documentation speaks of. > >I suppose I could take a look at fixing this, although I'm not extremely >familiar with it. If you could point me to where the java_readline >stuff is integrated into the interactive mode, I could have a go at it. That code is located in org\python\util\ReadlineConsole.java.=20 >Or, if you'd rather have someone more familiar with the internals do it, >I certainly understand. Well, I prefer that it is implemented by someone who really want it to work. If you decide to try, feel free to ask questions and seek advice on jython-dev. regards, finn |
From: <bc...@wo...> - 2002-01-05 22:07:40
|
[Steve Cohen] >There is a stack trace and it's the same whether or not >showJavaExceptions is true: That is OK. Thanks. >[scohen@sleepingbear scohen]$ jython >-Dpython.options.showJavaExceptions=3Dtrue >Jython 2.1 on java1.3.0 (JIT: null) >Type "copyright", "credits" or "license" for more information. >>>> import dbexts, isql >>>> d=3Ddbexts.dbexts("prod_sport") >>>> D=3Disql.IsqlCmd(d) >>>> D.use_rawinput=3D0 >>>> D.cmdloop() >Traceback (innermost last): > File "<console>", line 1, in ? > File "/usr/local/jython/jython-2.1/Lib/cmd.py", line 79, in cmdloop >TypeError: write(): 1st arg can't be coerced to String Not quite the error situation that I expected, but that just goes to show how important the context is. I have added a bug report about the situation. >The 1st arg is None, which is arguably a bug in isql.IsqlCmd. Are you absolutely sure that self.prompt is None. AFAICT D.prompt should be an instance of the Prompt class and that will cause the stacktrace above. A None value will cause a NPE which is a different bug. Please recheck the value of D.prompt. >The code >in cmdloop can't handle it (can't coerce it to String). I can work >around the bug by explicitly setting D.prompt (which is the first >argument passed in) before executing D.cmdloop() but then you are quite >right, there still isn't support for any form of readline, either the >java_readline that is in the interactive mode or even the Ctrl-N, Ctrl-P >stuff that the documentation speaks of. > >I suppose I could take a look at fixing this, although I'm not extremely >familiar with it. If you could point me to where the java_readline >stuff is integrated into the interactive mode, I could have a go at it. That code is located in org\python\util\ReadlineConsole.java. >Or, if you'd rather have someone more familiar with the internals do it, >I certainly understand. Well, I prefer that it is implemented by someone who really want it to work. If you decide to try, feel free to ask questions and seek advice on jython-dev. regards, finn |
From: dman <ds...@ri...> - 2002-01-05 15:16:53
|
On Sat, Jan 05, 2002 at 01:31:25PM +0000, Finn Bock wrote: | So we should start looking for another installer to use. I prefer an | open-source installer for all the obvious reasons. It is a strong | requirement that the resulting .class file can be installed with a java1 | VM, including jview. How about just distributing a zip and/or tar file? Tell the user to unpack it where they want jython "installed" and set an environment variable for the startup scripts to use (or modify the scripts so they know where jython is installed). This is simplest for you to do, requires no new tools, and I prefer it because I don't like installers when I don't know what they are doing to my system. My $0.02 -D -- A violent man entices his neighbor and leads him down a path that is not good. Proverbs 16:29 |