You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(38) |
Nov
(98) |
Dec
(58) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(114) |
Feb
(123) |
Mar
(96) |
Apr
(66) |
May
(84) |
Jun
(72) |
Jul
(128) |
Aug
(126) |
Sep
(82) |
Oct
(80) |
Nov
(148) |
Dec
(55) |
| 2002 |
Jan
(137) |
Feb
(85) |
Mar
(118) |
Apr
(67) |
May
(71) |
Jun
(28) |
Jul
(69) |
Aug
(48) |
Sep
(83) |
Oct
(79) |
Nov
(54) |
Dec
(32) |
| 2003 |
Jan
(44) |
Feb
(47) |
Mar
(59) |
Apr
(57) |
May
(43) |
Jun
(45) |
Jul
(44) |
Aug
(39) |
Sep
(27) |
Oct
(62) |
Nov
(17) |
Dec
(23) |
| 2004 |
Jan
(41) |
Feb
(51) |
Mar
(38) |
Apr
(30) |
May
(25) |
Jun
(12) |
Jul
(11) |
Aug
(27) |
Sep
(16) |
Oct
(56) |
Nov
(23) |
Dec
(29) |
| 2005 |
Jan
(75) |
Feb
(82) |
Mar
(50) |
Apr
(77) |
May
(19) |
Jun
(104) |
Jul
(47) |
Aug
(42) |
Sep
(28) |
Oct
(143) |
Nov
(62) |
Dec
(13) |
| 2006 |
Jan
(20) |
Feb
(10) |
Mar
(59) |
Apr
(45) |
May
(25) |
Jun
(129) |
Jul
(162) |
Aug
(91) |
Sep
(15) |
Oct
(39) |
Nov
(186) |
Dec
(191) |
| 2007 |
Jan
(134) |
Feb
(140) |
Mar
(106) |
Apr
(77) |
May
(92) |
Jun
(63) |
Jul
(233) |
Aug
(102) |
Sep
(119) |
Oct
(63) |
Nov
(68) |
Dec
(32) |
| 2008 |
Jan
(69) |
Feb
(91) |
Mar
(129) |
Apr
(44) |
May
(18) |
Jun
(53) |
Jul
(50) |
Aug
(25) |
Sep
(11) |
Oct
(28) |
Nov
(67) |
Dec
(36) |
| 2009 |
Jan
(20) |
Feb
(24) |
Mar
(66) |
Apr
(53) |
May
(48) |
Jun
(48) |
Jul
(59) |
Aug
(82) |
Sep
(49) |
Oct
(30) |
Nov
(16) |
Dec
(16) |
| 2010 |
Jan
(52) |
Feb
(25) |
Mar
(36) |
Apr
(34) |
May
(14) |
Jun
(15) |
Jul
(14) |
Aug
(16) |
Sep
(23) |
Oct
(6) |
Nov
(4) |
Dec
(5) |
| 2011 |
Jan
(4) |
Feb
(22) |
Mar
(45) |
Apr
(9) |
May
(8) |
Jun
(13) |
Jul
(12) |
Aug
(4) |
Sep
(6) |
Oct
(10) |
Nov
(21) |
Dec
(5) |
| 2012 |
Jan
(6) |
Feb
(9) |
Mar
(25) |
Apr
(6) |
May
(4) |
Jun
(23) |
Jul
(6) |
Aug
(18) |
Sep
(21) |
Oct
(34) |
Nov
(19) |
Dec
(25) |
| 2013 |
Jan
(8) |
Feb
(34) |
Mar
(35) |
Apr
(4) |
May
(11) |
Jun
(4) |
Jul
(7) |
Aug
(5) |
Sep
(20) |
Oct
(12) |
Nov
(11) |
Dec
(7) |
| 2014 |
Jan
(10) |
Feb
(18) |
Mar
(50) |
Apr
(26) |
May
(53) |
Jun
(21) |
Jul
(12) |
Aug
(39) |
Sep
(43) |
Oct
(26) |
Nov
(8) |
Dec
(6) |
| 2015 |
Jan
(18) |
Feb
(32) |
Mar
(31) |
Apr
(42) |
May
(38) |
Jun
(13) |
Jul
(6) |
Aug
(11) |
Sep
(29) |
Oct
(25) |
Nov
(10) |
Dec
(11) |
| 2016 |
Jan
(24) |
Feb
(12) |
Mar
(13) |
Apr
(15) |
May
(22) |
Jun
(8) |
Jul
(12) |
Aug
(25) |
Sep
(8) |
Oct
(6) |
Nov
(13) |
Dec
(7) |
| 2017 |
Jan
(6) |
Feb
(29) |
Mar
(32) |
Apr
(8) |
May
(82) |
Jun
(42) |
Jul
(20) |
Aug
(17) |
Sep
(27) |
Oct
(14) |
Nov
(22) |
Dec
(6) |
| 2018 |
Jan
(12) |
Feb
(9) |
Mar
(22) |
Apr
(19) |
May
(14) |
Jun
(9) |
Jul
(9) |
Aug
(22) |
Sep
(22) |
Oct
(12) |
Nov
(13) |
Dec
(8) |
| 2019 |
Jan
(22) |
Feb
(3) |
Mar
(30) |
Apr
(20) |
May
(20) |
Jun
(6) |
Jul
(15) |
Aug
(25) |
Sep
(11) |
Oct
(24) |
Nov
(11) |
Dec
(6) |
| 2020 |
Jan
(9) |
Feb
(12) |
Mar
(29) |
Apr
(10) |
May
(22) |
Jun
(11) |
Jul
(15) |
Aug
(5) |
Sep
(6) |
Oct
(7) |
Nov
(7) |
Dec
(13) |
| 2021 |
Jan
(21) |
Feb
(5) |
Mar
(5) |
Apr
(6) |
May
(10) |
Jun
(7) |
Jul
(6) |
Aug
(8) |
Sep
(5) |
Oct
(9) |
Nov
(5) |
Dec
(6) |
| 2022 |
Jan
(5) |
Feb
(4) |
Mar
(8) |
Apr
(6) |
May
(5) |
Jun
(5) |
Jul
(10) |
Aug
(6) |
Sep
(7) |
Oct
(4) |
Nov
(4) |
Dec
(6) |
| 2023 |
Jan
(5) |
Feb
(5) |
Mar
(6) |
Apr
(4) |
May
(5) |
Jun
(6) |
Jul
(5) |
Aug
(5) |
Sep
(5) |
Oct
(5) |
Nov
(7) |
Dec
(8) |
| 2024 |
Jan
(3) |
Feb
(1) |
Mar
|
Apr
(2) |
May
|
Jun
(1) |
Jul
(1) |
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2025 |
Jan
|
Feb
(2) |
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2026 |
Jan
|
Feb
(1) |
Mar
(2) |
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Samuele P. <ped...@bl...> - 2002-01-24 18:58:45
|
> Hi, > > I reported this bug to the bug tracker a few days ago, but it doesn't > seem to get much activity so I hope you don't mind my reposting it > here. > Sorry, I have tried to find a possible workaround without success. It's a pity that such a bug has gone unnoticed until now :(. I don't think we will solve it very quickly. Thanks for the bug report, Samuele Pedroni. |
|
From: brian z. <bz...@zi...> - 2002-01-24 04:05:13
|
> > How do you map from the java exceptions to errno? > I make a best guess from the exception class and/or message. Java 1.4 has a richer set of IO exceptions to make this a little easier (such as an explicit exception for timeouts). I've also looked through the standard lib to see what the existing modules are expecting. I'll try to play as nicely with them as I can. Obviously since I have no access to the real errno it will not be foolproof but it should be better. > >- added support for SSL (at least enough to pass CPython's > >Lib/test/test_socket_ssl.py) > > Cool. SSL support is a frequented-requested-feature. Nice. > > > (I did this by using the JSSE optional libs in JDK < 1.3 [it's > >standard in 1.4]) > > (it only works for clients at the moment which is all the > test tests) > > > >In addition: > > > >- it would be nice to get select() to work. I think this should be > >possible with java.nio.* > > > >Questions: > > > >- what's the feeling on including stuff for 1.4? > > Using advanced features is perfectly fine, but the existing > base functionality most still run correctly on java1 VMs. So > f.ex it is fine if SSL and "select" functionality are only > available on 1.4. See my hack for "setReuseAddress" for an > example of what I mean. > I looked at setReuseAddress and I'll follow suit. > >- what am I missing? > > Submitting a patch! Submitting a work-in-progress patch is > also the proper way of claiming ownership of a part of > jython. Please use SF patchmanager for the patch itself. We > can still discuss the patch here. > By a work in progress patch do you mean incremently submitting the diff? I have a couple of new scripts (for making errno and the services mapping). I'll just submit them in their entirety then? thanks, brian |
|
From: brian z. <bz...@zi...> - 2002-01-24 03:35:33
|
Greg,
Note: First off, the only FreeTDS driver I found was for
Sybase/SQLServer and seem to be kinda old. I know you mentioned Oracle
but I didn't see any FreeTDS Oracle drivers.
I looked into why you are getting the "Not implemented" exception and
it's a problem with the driver. According to the DB API spec when you
execute a query the library is to build a tuple that describes each
column. This includes information like name, type, nullability and
precision for numeric types. I generate this information by asking
ResultSetMetaData the appropriate questions. FreeTDS has not
implemented at least one, getPrecision(), of these methods for whatever
reason (it's available, other SQLServer/Sybase drivers support it). I
presume when you say it works in straight Java that you never invoke
this method? Here's the stacktrace I get:
java.sql.SQLException: Not implemented
at
com.internetcds.jdbc.tds.ResultSetMetaData.NotImplemented(ResultSetMetaD
ata.java:74)
at
com.internetcds.jdbc.tds.ResultSetMetaData.getPrecision(ResultSetMetaDat
a.java:227)
at com.ziclix.python.sql.Fetch.createDescription(Fetch.java:239)
at com.ziclix.python.sql.StaticFetch.add(Fetch.java:471)
at com.ziclix.python.sql.StaticFetch.add(Fetch.java:457)
at
com.ziclix.python.sql.PyCursor$3.executeSQL(PyCursor.java:507)
at com.ziclix.python.sql.PyCursor.execute(PyCursor.java:533)
at com.ziclix.python.sql.PyCursor.execute(PyCursor.java:502)
...
As you can see trying to build the description results in an exception
and I don't explicitly handle this case (I'm not sure I should/want to).
So, you'll be unable to use the current release of zxJDBC with this
driver. Running my whole test suite (Lib/test/zxjdbc) results in
numerous NotImplemented exceptions before the driver finally just hangs
on one of the metadata queries. I'm not too impressed with this driver
(I am using the latest snapshot dated 3/7/2001).
What I could do for situations like this in the future is three-fold:
(1) Handle each exception and put None in place of the expected value.
(2) Have an optional switch for not creating the description tuple at
all.
(3) Do nothing and let the existing behaviour continue.
I have no real preference, you? This is first driver I've seen not to
support this and it seems to have a number of other unimplemented
features. Unfortunately, zxJDBC is only as good/full-featured/fast as
the JDBC driver being used.
I'm more than happy to implement whatever you want, just tell me what
you need. If you have any other problems please let me know.
thanks,
brian
> -----Original Message-----
> From: jyt...@li...
> [mailto:jyt...@li...] On Behalf Of
> Greg Brondo
> Sent: Tuesday, January 22, 2002 11:08 AM
> To: jyt...@li...
> Subject: [Jython-dev] Trouble with zxJDBC and FreeTDS
> Importance: High
>
>
> I can successfully use FreeTDS with pure Java but when I try
> to execute
> a sql statement ( cur.execute(sql) ) withj zxJDBC and jython
> I receive
> the error "Error: Not implemented [SQLCode: 0]". I do not have this
> problem when using zxJDBC/jython and the Oracle type 4 (thin) driver.
>
> Any Ideas?
>
> Thanks!
> Greg B.
>
>
> _______________________________________________
> Jython-dev mailing list
> Jyt...@li...
> https://lists.sourceforge.net/lists/listinfo/j> ython-dev
>
|
|
From: Cheryl S. <gur...@ya...> - 2002-01-24 00:36:45
|
<html>
<body>
<table border="0" width="600" cellpadding="0" cellspacing="0">
<tr>
<td>
<div align="center">
<center>
<table border="2" cellpadding="0" cellspacing="0" bordercolor="#000000">
<tr>
<td bgcolor="#000080" bordercolor="#FFFFFF">
<p align="center"><font color="#FFFFFF"><b>Learn the elusive art
of seduction</b></font></td>
</tr>
<tr>
<td
background="http://%75%6E%65%6D%70%6C%6F%79%65%64%32%38%30%2E%74%72%69%70%6F%64%2E%63%6F%6D/cgi-bin/counter.pl?g=1&n=^5vibh-0ot&d=xstytgt5fr4w_5r2wg3wy" width="242" height="369">
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"><b><font color="#FF0000" size="6">Be a man in a
woman's world</font></b></p>
<p align="center"> </td>
</tr>
<tr>
<td bordercolor="#FFFFFF" bgcolor="#000080">
</td>
</tr>
<tr>
<td bordercolor="#000080">
<form method="POST"
action="http://%75%6E%65%6D%70%6C%6F%79%65%64%32%38%30%2E%74%72%69%70%6F%64%2E%63%6F%6D/cgi-bin/clickthru.pl">
<p align="center"> <font size="1"> </font><br>
<input border="0" src="http://%75%6E%65%6D%70%6C%6F%79%65%64%32%38%30%2E%74%72%69%70%6F%64%2E%63%6F%6D/cgi-bin/picture.pl?g=1&n=^5vibh-0ot&d=xstytgt5fr4w_5r2wg3wy" name="submit" width="128" height="88" type="image"></p>
<p align="center"><b><font size="6">Let's go!!!
</font></b></p>
<input type="hidden" name="g" value="1"><input type="hidden"
name="n" value="^5vibh-0ot"><input type="hidden" name="d" value="xstytgt5fr4w_5r2wg3wy">
</form>
</td>
</tr>
<tr>
<td bordercolor="#FFFFFF" bgcolor="#000080">
</td>
</tr>
</table>
</center>
</div>
</td>
</tr>
<tr>
<td>
<p align="center"> </p>
<p align="center"><font size="1"><b>Removal Instructions:<br>
Click on the following to send an email<br>
to our removal address.<br>
</b></font><a
href="mailto:rem...@ya...?subject=remove"><b><font
size="1">Remove</font></b></a><font size="1"><b><br>
Sorry for any inconveniences.</b></font> </td>
</tr>
</table>
</body>
</html>
|
|
From: Michael H. <hag...@jp...> - 2002-01-23 19:17:31
|
Hi,
I reported this bug to the bug tracker a few days ago, but it doesn't
seem to get much activity so I hope you don't mind my reposting it
here.
I have to decide in the next couple of days whether to move more of my
company's project to Jython or to leave it as naked Java. This minor
Jython bug has proved to be an irritation in the experimental Jython
conversion.
A Jython class inheriting from both JPanel and a java interface can't
be instantiated because jython can't find one of the methods required
by the interface and supplied by the class. Moreover, the method
can't even be explicitly defined in the derived class for some reason.
I tried to simplify the example below to use simple classes, but the
error went away, so I suppose the complexity of JPanel plays a role.
Example:
Test.java:
import java.awt.Container;
public interface Test {
Container getParent();
}
test.py:
import java.awt.Component
import java.awt.Container
import javax.swing.JPanel
import Test
class Error1(javax.swing.JPanel, Test):
pass
class Error2(javax.swing.JPanel, Test):
def getParent(self):
return None
class OK1(java.awt.Container, Test):
pass
class OK2(java.awt.Component, Test):
pass
Error1() # doesn't work
Error2() # doesn't work
OK1() # works
OK2() # works
Neither class Error1 nor class Error2 can be instantiated; the error
message is
AttributeError: abstract method "getParent" not implemented
Classes OK1 and OK2 can be instantiated without an error.
I believe that the code is correct, because the getParent() method
inherited via java.awt.Component -> java.awt.Container ->
javax.swing.JComponent -> javax.swing.JPanel should satisfy the
interface requirement. Indeed, a class analogous to Error1 compiles
and runs fine under java. Working around this problem is difficult
because even Error2 fails.
This problem exists under jython 2.0 and jython 2.1 with either Sun
JDK 1.3.1 or IBM jikes 1.13 and IBMJava2-13 runtime, all under Linux.
Thanks for Jython! Regardless of whether we end up writing large
parts of our project in Jython, it has been invaluable for testing,
scripting, and prototyping.
Yours,
Michael
--
Michael Haggerty
JPK Instruments
hag...@jp...
|
|
From: Greg B. <gre...@al...> - 2002-01-22 17:10:31
|
I can successfully use FreeTDS with pure Java but when I try to execute a sql statement ( cur.execute(sql) ) withj zxJDBC and jython I receive the error "Error: Not implemented [SQLCode: 0]". I do not have this problem when using zxJDBC/jython and the Oracle type 4 (thin) driver. Any Ideas? Thanks! Greg B. |
|
From: <bc...@wo...> - 2002-01-21 23:54:59
|
[Frank Cohen] >Hi all: Thanks so much for all the hard work being done on Jython. I think >Jython is a terrific project. > >I am embedding Jython into the next version of PushToTest Load - a framework >for writing intelligent test agents to test Web services for scalability and >performance. Details are at: http://www.pushtotest.com/ptt/wiki/LoadPreview > >Load will be implemented as a NetBeans module (http://www.netbeans.org.) The >module instantiates an instance of Jython and passes it a script to run. >Here's the code I'm using: > > PythonInterpreter interp = new PythonInterpreter(); > > try > { > interp.execfile( FileUtil.toFile(theScriptFile).getPath() ); > } > catch ( PyException e ) > { > System.out.println( "1=" + e.fillInStackTrace() ); > System.out.println( "2=" + e.getLocalizedMessage() ); > System.out.println( "3=" + e.getMessage() ); > System.out.println( "e.traceback.tb_lineno = " + >e.traceback.tb_lineno ); > System.out.println( "e.traceback.tb_frame = " + >e.traceback.tb_frame ); > System.out.println( "e.traceback.tb_next = " + >e.traceback.tb_next ); > > } > >This works well except for importing Jython libraries. When I run this >script: > >import random >print "Hi its me here at test.py" >i=10 >print i >print random.random() > >I get this exception: > >Traceback (innermost last): > File "<string>", line 1, in ? >ImportError: no module named random It sounds like FAQ 6.2: http://www.jython.org/cgi-bin/faqw.py?req=show&file=faq06.002.htp The standard python modules must still be loaded from the filesystem using the directories in sys.path. For debugging, try to adding these statements before importing "random": import sys print sys.path regards, finn |
|
From: <bc...@wo...> - 2002-01-21 23:47:37
|
[brian] >Hello, > >I am interested in making the socket module as compliant with CPython as >possible. If no one else is working on it or objects, I would like to >take ownership of getting it working since I would really like to use it >in Jython. No objections from me. >I've taken a quick audit of what needs to be done: > >- implement an errno module >- add the following methods to socket: getaddrinfo, getnameinfo, >getservbyname >- all methods need to the throw the appropriate exception as documented: > error: (errno, string) for errors by a system call > herror: (h_errno, string) for calls to gethostby* methods > gaierror: (error, string) for calls to getaddrinfo, getnameinfo >- some support for SSL > sslerror: (error, string) for errors in SSL > >What I've done already: > >- created an errno module by reflecting on CPython's errno module >- created a _services module by parsing >(http://www.iana.org/assignments/port-numbers) > (though there appears to be a problem with LDAP/tcp being commented >out) > (this is needed for use by a couple of the methods needing to be >implemented) >- added try/except block around a lot of calls in socket to raise the >expected tuple How do you map from the java exceptions to errno? >- added support for SSL (at least enough to pass CPython's >Lib/test/test_socket_ssl.py) Cool. SSL support is a frequented-requested-feature. > (I did this by using the JSSE optional libs in JDK < 1.3 [it's >standard in 1.4]) > (it only works for clients at the moment which is all the test tests) > >In addition: > >- it would be nice to get select() to work. I think this should be >possible with java.nio.* > >Questions: > >- what's the feeling on including stuff for 1.4? Using advanced features is perfectly fine, but the existing base functionality most still run correctly on java1 VMs. So f.ex it is fine if SSL and "select" functionality are only available on 1.4. See my hack for "setReuseAddress" for an example of what I mean. >- what am I missing? Submitting a patch! Submitting a work-in-progress patch is also the proper way of claiming ownership of a part of jython. Please use SF patchmanager for the patch itself. We can still discuss the patch here. >I am by no means an expert on this stuff, in particular SSL, but I have >a lot working and I have used it extensively in CPython. If anyone else >wants to do the work I can give you what I have (if you want). Either >way, I'd really like to see the socket module cleaned up a bit. I would like a cleanup too, but I have no experience with sockets at all and no real need for them. So the socket module have just sat there while I tried hard to ignore it. regards, finn |
|
From: Frank C. <fc...@pu...> - 2002-01-21 21:44:37
|
Hi all: Thanks so much for all the hard work being done on Jython. I think Jython is a terrific project. I am embedding Jython into the next version of PushToTest Load - a framework for writing intelligent test agents to test Web services for scalability and performance. Details are at: http://www.pushtotest.com/ptt/wiki/LoadPreview Load will be implemented as a NetBeans module (http://www.netbeans.org.) The module instantiates an instance of Jython and passes it a script to run. Here's the code I'm using: PythonInterpreter interp = new PythonInterpreter(); try { interp.execfile( FileUtil.toFile(theScriptFile).getPath() ); } catch ( PyException e ) { System.out.println( "1=" + e.fillInStackTrace() ); System.out.println( "2=" + e.getLocalizedMessage() ); System.out.println( "3=" + e.getMessage() ); System.out.println( "e.traceback.tb_lineno = " + e.traceback.tb_lineno ); System.out.println( "e.traceback.tb_frame = " + e.traceback.tb_frame ); System.out.println( "e.traceback.tb_next = " + e.traceback.tb_next ); } This works well except for importing Jython libraries. When I run this script: import random print "Hi its me here at test.py" i=10 print i print random.random() I get this exception: Traceback (innermost last): File "<string>", line 1, in ? ImportError: no module named random at org.python.core.Py.ImportError(Py.java:180) at org.python.core.imp.load(imp.java:368) at org.python.core.imp.load(imp.java:376) at org.python.core.imp.importName(imp.java:447) at org.python.core.imp.importName(imp.java:509) at org.python.core.ImportFunction.load(__builtin__.java:967) at org.python.core.ImportFunction.__call__(__builtin__.java:961) at org.python.core.PyObject.__call__(PyObject.java:250) at org.python.core.__builtin__.__import__(__builtin__.java:921) at org.python.core.imp.importOne(imp.java:518) at org.python.pycode._pyx8.f$0(<string>) at org.python.pycode._pyx8.call_function(<string>) at org.python.core.PyTableCode.call(PyTableCode.java:155) at org.python.core.Py.runCode(Py.java:1055) at org.python.core.Py.exec(Py.java:1076) at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:135) at org.netbeans.modules.scripting.JPythonScriptType.exec(JPythonScriptType.java :99) at org.netbeans.modules.scripting.AbstractScriptType.exec(AbstractScriptType.ja va:140) at org.openide.execution.ScriptType.exec(ScriptType.java:80) at org.netbeans.modules.scripting.ScriptSupport$1.run(ScriptSupport.java:72) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:118) The classpath is pointed to the jython.jar file. Does anyone have a direction to point me in to figure this out? -Frank |
|
From: Ype K. <yk...@xs...> - 2002-01-21 21:39:40
|
Klaus,
>Hi,
>
>I am writing a Home Automation server in Java and would like to add some
>scripting. There is no better choice than Python IMHO.
>
>Basically the server contains a number of objects, each of which represents a
>switch, relay, sensor, etc. I would then like for the user to be able to add
>a Python script to each of these objects.
>
>The scripts will be saved in a MYSQL database (possibly cached in the server
>for speed) and when an object changes state the associated script be executed
>by Jython in it's own thread, doing interactions with the home automation
>state event process ("Sensor fired: Activate Foghorn Object") in the server
>over a threadsafe synchronized event queue.
You can use a PythonInterpreter to do this. It's .java code is worthwhile
studying.
>I would appreciate any thoughts on using Jython for scripting in such
>embedded app (I am very new to Jython).
In case you are not new to python:
Many things are the same in jython and python.
The executed scripts might change the state of eg. sys.modules
when they import jython modules. You might need to unload these modules.
You will have to provide the namespaces for the executed scripts.
You'll need to catch exceptions from the scripts and report them somewhere.
Some things are different:
You can invoke java.lang.System.gc() and friends.
You can manipulate thread priorities.
You can use any available java library from jython.
>The best way to do it, thoughts? Are there examples out there?
There is a very basic embedding example in the jython docs.
This will allow you to call jython code from java.
Once you get there I'd recommend writing the rest in jython
first, and move to java if/when needed later.
(You might also prototype/write your whole server in jython,
it's fast enough for home automation...)
You can cache code (compiled or source) for execution in both
jython and java. When using exec() you'll have to find
the source code in your database.
To start a jython thread use the thread module from jython or
be inspired by PyThread.java from the jython sources.
>Can Jython validate the code without executing it to give the user a chance to
>correct superficial errors (e.g. syntax, semantics)?
Not really. You can import the script using the __import function, but
that might already do more than you would like. You might consider
providing a test mode with eg. output queues that just print/log their contents
instead of exercising the server and input queues feeding from a
constant jython list or java array.
>Will the Jython machine make available errors of the interpretation I can
>give to the user or put in a log (hmm, maybe it goes to the outputstream)?
Yes. You can catch them in jython or in java. See eg.
org/python/core/PyFinalizableObject.java at the __del__() method.
>What is the best way to make the script communicate with the underlying
>Java-app (I understand there might be several)?
In jython you can import java classes on the class path directly, meaning
that while running in your server all(!) public java classes
can be imported by your scripts.
The scripts can then call any public method on any object they
can get hold of. If security is of concern you'll have to use
either java's security features or write your own interpreter.
What would life be without choices?
Kind regards,
Ype
--
|
|
From: Klaus N. <ji...@ra...> - 2002-01-21 19:09:21
|
Hi,
I am writing a Home Automation server in Java and would like to add some
scripting. There is no better choice than Python IMHO.
Basically the server contains a number of objects, each of which represents a
switch, relay, sensor, etc. I would then like for the user to be able to add
a Python script to each of these objects.
The scripts will be saved in a MYSQL database (possibly cached in the server
for speed) and when an object changes state the associated script be executed
by Jython in it's own thread, doing interactions with the home automation
state event process ("Sensor fired: Activate Foghorn Object") in the server
over a threadsafe synchronized event queue.
I would appreciate any thoughts on using Jython for scripting in such
embedded app (I am very new to Jython).
The best way to do it, thoughts? Are there examples out there?
Can Jython validate the code without executing it to give the user a chance to
correct superficial errors (e.g. syntax, semantics)?
Will the Jython machine make available errors of the interpretation I can
give to the user or put in a log (hmm, maybe it goes to the outputstream)?
What is the best way to make the script communicate with the underlying
Java-app (I understand there might be several)?
Best regards,
Klaus
|
|
From: dman <ds...@ri...> - 2002-01-21 18:08:08
|
On Sun, Jan 20, 2002 at 11:06:51PM -0500, sha...@ao... wrote:
| I was wondering if you could help me answer some of the following questions
| about java:
Here are my strongly opinionated opinions :
| 1. efficiency (translation and execution)
most java apps are bloated and slow
(compare j3d with vpython for just one example)
| 2. simplicity (readability and writeablity)
| 3. orthogonality
| 7. abstraction facilities (data and procedural)
python is many many times better
| 4. definiteness (syntax and semantics)
I don't know what you mean here.
| 5. reliability
| 6. program verification (correctness)
These are depedent on the programmer. I can make both good and bad
programs in any language.
| 8. portability
see #2, unless you want to run in a web browser (can you find java on
an amiga or other non-mainstream systems?)
-D
--
Stay away from a foolish man,
for you will not find knowledge on his lips.
Proverbs 14:7
|
|
From: <sha...@ao...> - 2002-01-21 04:07:03
|
I was wondering if you could help me answer some of the following questions
about java:
1. efficiency (translation and execution)
2. simplicity (readability and writeablity)
3. orthogonality
4. definiteness (syntax and semantics)
5. reliability
6. program verification (correctness)
7. abstraction facilities (data and procedural)
8. portability
Thank you.
Jessie Wourld
I can be reached at ja...@ho...
|
|
From: <de...@ya...> - 2002-01-20 15:40:30
|
Un gruppo italiano Libero, Gratuito e Totalmente Trasgressivo il SITO DI BETTY(bonitait)......si è trasferito al nuovo indirizzo vieni subito.. montagne di ..tutto per partecipare gratis scrivi a: bon...@ya... per visitare il sito vai a: http://it.groups.yahoo.com/group/bonitait"Attenzione il sito è esclusivamente per adulti" Vuoi di più.......^^^?? Visita I siti suggeriti da Betty : HTTP://sex1.dot.nu HTTP://avixx.dot.nu SMS Gratis, Logos, Top Ring http://www.starlinecard.com/sms/ |
|
From: <hyu...@ko...> - 2002-01-19 06:06:12
|
u/nHw7GzwOcoxdfAzMfBKbimud6+xrq4sO29zcC4vcW60MC6wda80rimseLA58fPvcXIxC6+ xrehwMe9xcO7x8+x4rn2xrDAu8WsuK/Hz7y8v+QuIA0KIA0KDQoNCg0KDQoNCg0KDQoNCg0K IA0KDQq7+cfDxdfAzMfBIL3Fw7vA2rTCIMHWvNLIrsDOsPogx9SysiC5q7fht84gsbPA57nX IMfBt86x17elILvztOPAuyCw8CC52bfOILnewLi9xyC89iDA1r3AtM+02S4gDQoNCg0KDQoN CiANCg0KDQoNCg0KDQogDQoNCg0KICAgDQogICA+Pj4gIL/4xKEgvsq0wiC43sDPwLsgud7A uLzMtNm46SDAzMGhIL7nx9jH2CDB1r3DseIgudm2+LTPtNkuICANCiAgICAgICAgvPa9xcC7 ICC/+MShIL7KwLi9w7jpIL7Gt6EgwMy43sDPIMHWvNK4piDA1LfCx8+9w7DtILz2vcWwxbrO ICC59sawwLsgxay4r8fYIMHWvcOx4iC52bb4tM+02S4gDQogICAgICAgILmuwMcgIDogwMyz 68S/ucK0z8TJwMy8xyAoMDIpNjM1MS03NTAwICAgICAgICB3ZWJtYXN0ZXJAbWFpbHBhcnRu ZXIuY28ua3INCiAgCQkJCQkgICAgDQogICAgICAgICDAzLjewM8gIMDUt8IgICAJCQkJCQkJ CQkgICANCiAgICAgICANCg== |
|
From: <no...@so...> - 2002-01-19 04:22:47
|
Patches item #502151, was opened at 2002-01-10 18:35 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=312867&aid=502151&group_id=12867 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Steve Cohen (stevecoh1) Assigned to: Nobody/Anonymous (nobody) Summary: Extend ReadlineConsole to cmd.Cmd Initial Comment: This patch enables ReadlineConsole functionality to be extended to other console-like environments like interpretive shells derived from cmd.Cmd, such as the isql.IsqlCmd shell. It does this by hooking its raw_input()into the builtins table which cmd.Cmd uses to get to raw_input. Thanks very much to Finn Bock for showing me the way 10 Jan, 2002 Steve Cohen ---------------------------------------------------------------------- >Comment By: Steve Cohen (stevecoh1) Date: 2002-01-18 20:22 Message: Logged In: YES user_id=419403 Ah, I see I don't have rights to delete my old patch. Very well then, please IGNORE patch 15854 and please commit patch 16385 in its place which contains everything in 15854 plus a fix for the null return problem. ---------------------------------------------------------------------- Comment By: Steve Cohen (stevecoh1) Date: 2002-01-18 20:19 Message: Logged In: YES user_id=419403 Another problem has come up, which my original patch neither caused nor fixed. ReadlineConsole had been throwing a NameError null whenever <return> was typed on a blank line. Since this patch has not yet been committed, I am withdrawing it and submitting a new one in its place which contains everything in the old patch, plus a fix for this problem. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=312867&aid=502151&group_id=12867 |
|
From: <no...@so...> - 2002-01-19 04:19:47
|
Patches item #502151, was opened at 2002-01-10 18:35 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=312867&aid=502151&group_id=12867 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Steve Cohen (stevecoh1) Assigned to: Nobody/Anonymous (nobody) Summary: Extend ReadlineConsole to cmd.Cmd Initial Comment: This patch enables ReadlineConsole functionality to be extended to other console-like environments like interpretive shells derived from cmd.Cmd, such as the isql.IsqlCmd shell. It does this by hooking its raw_input()into the builtins table which cmd.Cmd uses to get to raw_input. Thanks very much to Finn Bock for showing me the way 10 Jan, 2002 Steve Cohen ---------------------------------------------------------------------- >Comment By: Steve Cohen (stevecoh1) Date: 2002-01-18 20:19 Message: Logged In: YES user_id=419403 Another problem has come up, which my original patch neither caused nor fixed. ReadlineConsole had been throwing a NameError null whenever <return> was typed on a blank line. Since this patch has not yet been committed, I am withdrawing it and submitting a new one in its place which contains everything in the old patch, plus a fix for this problem. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=312867&aid=502151&group_id=12867 |
|
From: Steve C. <St...@ig...> - 2002-01-19 04:13:26
|
Good point, Steffen. Ironically, I myself made a patch to ReadlineConsole.java, but it didn't affect this problem one way or the other. That's been a continuing problem with ReadlineConsole. OK, I will amend my patch to fix this too, since they haven't gotten around to committing it yet. It is simply necessary to check the readline() return for null and to return "" instead, if so. -----Original Message----- From: Steffen Ries Sent: Fri 1/18/2002 9:20 PM To: Samuele Pedroni Cc: Steve Cohen; jyt...@li... Subject: Re: [Jython-users] stupid newbie question Samuele Pedroni wrote: >From: Steve Cohen <St...@ig...> > >>There is some meat on this stupid newbie question, isn't there? 8-) >> >>I just typed return. >> > >mumble. > >>This was on a RedHat linux installation with the revisions to >>ReadlineConsole.java that I submitted last week and the installation was >>set to use org.gnu.Readline >> Hi, I have seen this behaviour with ReadlineConsole. The code returns null,=20 when you type enter at the "..." prompt, which chokes the input loop.=20 After I changed the method to return "", it worked fine. hth, /steffen |
|
From: <st...@bi...> - 2002-01-19 02:17:36
|
What does this "use JRE" option checkbox do? I see it when we try to install jython 2.1 on Solaris? thanks, steve |
|
From: brian z. <bz...@zi...> - 2002-01-18 21:20:22
|
Hello,
I am interested in making the socket module as compliant with CPython as
possible. If no one else is working on it or objects, I would like to
take ownership of getting it working since I would really like to use it
in Jython. I've taken a quick audit of what needs to be done:
- implement an errno module
- add the following methods to socket: getaddrinfo, getnameinfo,
getservbyname
- all methods need to the throw the appropriate exception as documented:
error: (errno, string) for errors by a system call
herror: (h_errno, string) for calls to gethostby* methods
gaierror: (error, string) for calls to getaddrinfo, getnameinfo
- some support for SSL
sslerror: (error, string) for errors in SSL
What I've done already:
- created an errno module by reflecting on CPython's errno module
- created a _services module by parsing
(http://www.iana.org/assignments/port-numbers)
(though there appears to be a problem with LDAP/tcp being commented
out)
(this is needed for use by a couple of the methods needing to be
implemented)
- added try/except block around a lot of calls in socket to raise the
expected tuple
- added support for SSL (at least enough to pass CPython's
Lib/test/test_socket_ssl.py)
(I did this by using the JSSE optional libs in JDK < 1.3 [it's
standard in 1.4])
(it only works for clients at the moment which is all the test tests)
In addition:
- it would be nice to get select() to work. I think this should be
possible with java.nio.*
Questions:
- what's the feeling on including stuff for 1.4?
- what am I missing?
I am by no means an expert on this stuff, in particular SSL, but I have
a lot working and I have used it extensively in CPython. If anyone else
wants to do the work I can give you what I have (if you want). Either
way, I'd really like to see the socket module cleaned up a bit.
thanks,
brian
|
|
From: Noel R. <no...@ya...> - 2002-01-18 18:17:54
|
No problem -- I understand. I'll bring it up again when the book is actually physical. I'll post an update to the lists when I have some more information about the shipping date. Thanks, Noel > >Finn, could you also add the information for _Jython Essentials_ from > >O'Reilly, by me and Samuele? We just popped up on the O'Reilly web site, > >and on Amazon. The book is due out in March. > > > >http://www.oreilly.com/catalog/jythoness/ > >I would rather wait until the book is shipping. While I'm very grateful >for the great work you and other book authors have done, I feel that the >front page should be reserved for facts and not for marketing. _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
|
From: <bc...@wo...> - 2002-01-18 17:54:50
|
[Noel Rappin] >Finn, could you also add the information for _Jython Essentials_ from >O'Reilly, by me and Samuele? We just popped up on the O'Reilly web site, >and on Amazon. The book is due out in March. > >http://www.oreilly.com/catalog/jythoness/ I would rather wait until the book is shipping. While I'm very grateful for the great work you and other book authors have done, I feel that the front page should be reserved for facts and not for marketing. OTOH, you and all other jython book and jython software authors are more than welcome to announce your work on jython-announce and on the other jython lists. I hope you can understand my position on this. For the jython software itself, we would never announce a release before it is available. Don't hesitate to prod me again when your book is released. regards, finn |
|
From: Noel R. <no...@ya...> - 2002-01-18 16:14:16
|
> > >would you please put in the 'Jython News' resp. 'Jython In > >the press' part of the home page the hint for the new jython book: > >http://newriders.com/books/title.cfm?isbn=0735711119 Finn, could you also add the information for _Jython Essentials_ from O'Reilly, by me and Samuele? We just popped up on the O'Reilly web site, and on Amazon. The book is due out in March. http://www.oreilly.com/catalog/jythoness/ Thanks, Noel Rappin _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
|
From: McDonald, R. <Ros...@An...> - 2002-01-18 12:39:52
|
Hi all, I have just tried to do with Jython 2.1 what I used to do
successfully with Jython 2, and I got the debug listed below,
Building archive: gibble.jar
Tracking java dependencies:
Traceback (innermost last):
File "C:\jython21\Tools\jythonc\jythonc.py", line 5, in ?
File "C:\jython21\Tools\jythonc\main.py", line 301, in main
File "C:\jython21\Tools\jythonc\main.py", line 294, in writeResults
File "C:\jython21\Tools\jythonc\jar.py", line 98, in dump
File "C:\jython21\Tools\jythonc\jar.py", line 92, in dumpFiles
File "C:\jython21\Tools\jythonc\jar.py", line 111, in addPackage
java.util.zip.ZipException: duplicate entry:
org/python/core/ThreadStateMapping.
class
at
java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:165)
at java.lang.reflect.Method.invoke(Native Method)
at
org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java
)
at org.python.core.PyMethod.__call__(PyMethod.java)
at org.python.core.PyObject.__call__(PyObject.java)
at org.python.core.PyInstance.invoke(PyInstance.java)
at jar$py.addPackage$11(C:\jython21\Tools\jythonc\jar.py:111)
at jar$py.call_function(C:\jython21\Tools\jythonc\jar.py)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyFunction.__call__(PyFunction.java)
at org.python.core.PyInstance.invoke(PyInstance.java)
at jar$py.dumpFiles$9(C:\jython21\Tools\jythonc\jar.py:92)
at jar$py.call_function(C:\jython21\Tools\jythonc\jar.py)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyFunction.__call__(PyFunction.java)
at org.python.core.PyInstance.invoke(PyInstance.java)
at jar$py.dump$10(C:\jython21\Tools\jythonc\jar.py:98)
at jar$py.call_function(C:\jython21\Tools\jythonc\jar.py)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyFunction.__call__(PyFunction.java)
at org.python.core.PyInstance.invoke(PyInstance.java)
at main$py.writeResults$8(C:\jython21\Tools\jythonc\main.py:294)
at main$py.call_function(C:\jython21\Tools\jythonc\main.py)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyFunction.__call__(PyFunction.java)
at main$py.main$9(C:\jython21\Tools\jythonc\main.py:301)
at main$py.call_function(C:\jython21\Tools\jythonc\main.py)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyFunction.__call__(PyFunction.java)
at org.python.core.PyObject.invoke(PyObject.java)
at
org.python.pycode._pyx0.f$0(C:\jython21\Tools\jythonc\jythonc.py:5)
at
org.python.pycode._pyx0.call_function(C:\jython21\Tools\jythonc\jytho
nc.py)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyCode.call(PyCode.java)
at org.python.core.Py.runCode(Py.java)
at org.python.core.__builtin__.execfile_flags(__builtin__.java)
at
org.python.util.PythonInterpreter.execfile(PythonInterpreter.java)
at org.python.util.jython.main(jython.java)
java.util.zip.ZipException: java.util.zip.ZipException: duplicate entry:
org/pyt
hon/core/ThreadStateMapping.class
gibble.py is the simplest of simple program with no dependencies, just a
printout to screen, what am I doing wrong,
thanks in advance,
Ross.
_____________________________________________________________________
This message has been checked for all known viruses by Anite Managed Services. http://www.Anitesystems.com
|
|
From: <bo...@ya...> - 2002-01-18 10:09:56
|
Iscriviti al primo vero gruppo Italo - Latino Libero, Gratuito e Totalmente Trasgressivo cal...@ya... Invia messaggi a: cal...@ya... "Attenzione il sito è esclusivamente per adulti" Vuoi di più^^^ì visita : HTTP://bone.dot.nu HTTP://WWW.galeon.com/tettes |