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: Jayson B. <js...@ci...> - 2001-04-10 23:44:30
|
hi all,
When trying to run a script inside of a java looping body, like so:
interpreter.set("x", new PyInteger(42));
while(infile.ready()) {
interpreter.exec(infile.readLine());
}
I get the following error with the following python code:
Exception in thread "main" Traceback (innermost last):
(no code object) at line 0
File "<string>", line 2
SyntaxError: invalid syntax
the file I'm reading from is as follows:
if x == 42:
x = x + 1;
running anything but an if statement works just fine.. all my python
books say that is the right syntax... any ideas?
Jayson Baird
js...@ci...
|
|
From: <bc...@wo...> - 2001-04-10 20:30:36
|
[Paul J. Lewis] >First, just to say that Jython is excellent - I haven't had so much fun >programming since a) I discovered Java, and b) started programming >PalmOS! > >This is just a though. It would be really helpful if the Javadoc for >the API where available as a ZIP file. (I have to work at home, and >don't want to be connected to the www in order to browse the docs!) In Jython-2.1, the API docs will be included in the download and is installed locally. regards, finn |
|
From: Jim A. <ji...@tr...> - 2001-04-09 21:03:30
|
thp wrote:
>
> Hello!
> I am currently learning Java2 with JBuilder 4 foundation!
> Now i want to install Jython2.0,so i can program Python
> with Java.But how do i install the Jython stuff,so it can talk
> to Jbuilder 4?
> And how do you install the packages(from the net) into jbuilder4?
>
> thanks in advance!!
Jython does not really 'talk' to JBuilder: it is a library 'used' by
java code that you can build using JBuilder if you want.
Using the library is nothing special: First install Jython into any
directory (the default is fine).
Then in JBuilder's Project Properties, click the 'Required Libraries'
tab, then click Add. Select the folder you want the library to appear
in, and click 'New...'. Give it a name (Jython), then 'Add', then find
the 'jython.jar' and 'OK' your way out.
If you want to view/make changes to the source, in the 'Configure
Libraries' screen click the 'Source' tab and 'Add' the path to the root
of the source: <install-dir>/Jython/org.
That's it! Try loading up the sample code and running it: it is all just
Java !
--
__o
Jim Adrig _ \<,_
ji...@tr... ' `/ ' `
___________ `-' `-'
|
|
From: Danney J. <dan...@ma...> - 2001-04-09 19:56:25
|
Previously I had sent the following; however, since I did not get any response, here it is again. I have been programming in Java only a few days, and one of my first projects was to work on the ability to integrate Jython into InstallShield. Though there were many possible solutions, I wanted to have the ability for Jython to import .py modules from jar and zip files. I wrote the method loadFromZipFile into the imp.java file to resolve the problem. I realize it is quite crude; however, My hope is that a REAL Java programmer will run with it to add this capability to a build. I have found this capability a great deal of help in my attempts to create a number of Jython deployment solutions. -- Jython, the best thing since Java, because it is Java. Thanks, Danney Jarman Email: dan...@ma... |
|
From: Thomas B. B. <tb...@sy...> - 2001-04-09 07:36:09
|
Please note that you can actually "talk both ways" in a Java/Jython setup. Which way to "talk" is up to you. If you (as you wrote initially) want to program in Python from your java code, the simplest approach in my opinion is to instantiate a PythonInterpreter object in your Jythonized code. If you want to access java from Jython (as you also mentioned), you could write a Jython (Python) script that does that. To get a "feel" for this approach, however, you could also try the interactive Jython interpreter. Try building a simple JFrame, add buttons and dingenots on the fly. It's great fun! To Jythonize your java code from JBuilder you need to install (at least) the jython.jar file to some well-known directory. Then create a "library" in JBuilder that references this .jar file. Include this library in your JBuilder project, and you are set. To access additional .py modules, you will need to add the "lib" directory from the Jython package to your local Jython directory where you installed the jython.jar file. See www.jython.org for additional info on installing Jython from the "self-extracting" .class file and embedding Jython code in Java. Regards /Thomas > -----Original Message----- > From: thp [mailto:th...@hk...] > Sent: 9. april 2001 06:51 > To: jyt...@li... > Subject: [Jython-dev] help > > > Hello! > I am currently learning Java2 with JBuilder 4 foundation! > Now i want to install Jython2.0,so i can program Python > with Java.But how do i install the Jython stuff,so it can talk > to Jbuilder 4? > And how do you install the packages(from the net) into jbuilder4? > > > thanks in advance!! > > _______________________________________________ > Jython-dev mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-dev > |
|
From: Dominique B. <bro...@es...> - 2001-04-09 07:27:19
|
thp wrote: > > Hello! > I am currently learning Java2 with JBuilder 4 foundation! > Now i want to install Jython2.0,so i can program Python > with Java.But how do i install the Jython stuff,so it can talk > to Jbuilder 4? > And how do you install the packages(from the net) into jbuilder4? > > thanks in advance!! > I do not know a way to do this with jBuilder, but NetBeans 3.2Beta does it. Did you try it ? Dom |
|
From: thp <th...@hk...> - 2001-04-09 04:52:01
|
Hello! I am currently learning Java2 with JBuilder 4 foundation! Now i want to install Jython2.0,so i can program Python with Java.But how do i install the Jython stuff,so it can talk to Jbuilder 4? And how do you install the packages(from the net) into jbuilder4? thanks in advance!! |
|
From: Paul J. L. <pau...@cl...> - 2001-04-08 02:26:06
|
Hi. First, just to say that Jython is excellent - I haven't had so much fun programming since a) I discovered Java, and b) started programming PalmOS! This is just a though. It would be really helpful if the Javadoc for the API where available as a ZIP file. (I have to work at home, and don't want to be connected to the www in order to browse the docs!) Thanks. -- "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." |
|
From: Robert W. B. <rb...@di...> - 2001-04-07 21:26:15
|
Hi all,
I recently ran into another subtle differenct between CPython and
Jython that I was curious about. It concerns the "raise"
statement, and it's behavior when the first expression is an
instance object.
2.1a1 documentation says, "If the first expression is an instance object,
the second expression must be None."
In CPython example we see:
>>> import exceptions
>>> excpt = exceptions.TypeError()
>>> raise excpt, "Something not None"
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: instance exception may not have a separate value
Currently in Jython we see:
>>> import exceptions
>>> excpt = exceptions.TypeError()
>>> raise excpt, "Something not None"
Traceback (innermost last):
File "<console>", line 1, in ?
: Something not None
I was thinking that raising the TypeError is worthwile here. What
do others think?
If this is a good idea, here's unified diff (cvs diff below-
which one is preferred anyway?)
======================================================
--- .\Py.java Sat Apr 7 16:17:42 2001
+++ c:\windows\desktop\Py.java Sat Apr 7 16:10:44 2001
@@ -1029,6 +1029,14 @@
}
public static PyException makeException(PyObject type,
PyObject value) {
+ if (type instanceof PyInstance) {
+ if (value != Py.None) {
+ throw TypeError("instance exceptions may not have
" +
+ "a separate value");
+ } else {
+ return new PyException(type.__class__, type);
+ }
+ }
PyException exc = new PyException(type, value);
exc.instantiate();
return exc;
@@ -1037,6 +1045,16 @@
public static PyException makeException(PyObject type,
PyObject value,
PyObject traceback)
{
+ if (type instanceof PyInstance) {
+ if (value != Py.None) {
+ throw TypeError("instance exceptions may not have
" +
+ "a separate value");
+ } else {
+ type = type.__class__;
+ //return new PyException(type.__class__, type);
+ }
+ }
+
if (traceback == None)
return new PyException(type, value);
if (!(traceback instanceof PyTraceback))
- OR -
Index: Py.java
===================================================================
RCS file: /cvsroot/jython/jython/org/python/core/Py.java,v
retrieving revision 2.41
diff -r2.41 Py.java
1031a1032,1039
> if (type instanceof PyInstance) {
> if (value != Py.None) {
> throw TypeError("instance exceptions may not
have " +
> "a separate value");
> } else {
> return new PyException(type.__class__, type);
> }
> }
1039a1048,1057
> if (type instanceof PyInstance) {
> if (value != Py.None) {
> throw TypeError("instance exceptions may not
have " +
> "a separate value");
> } else {
> type = type.__class__;
> //return new PyException(type.__class__, type);
> }
> }
>
|
|
From: Kexx <ke...@in...> - 2001-04-07 17:09:38
|
Hello,
I was trying to freeze (actually web/servlet-ize, but that's besides the =
point) my Jython application, and failed - I must be doing something =
totally wrong. :-(.
Here's a short failure scenario:
-- module Main.py in root/current package --
# commented -- from amod.A import A
from bmod.B import B
B().bfunc()
-- end Main.py --
-- module A.py in package/directory apkg --
class A:
def afunc(self):
return "kermits"
-- end A.py --
-- module B.py in package/directory bpkg --
from apkg.A import A
class B:
def bfunc(self):
print A().afunc()
-- end B.py --
I also have 2 empty __init__.py files (one for apkg, the other for =
bpkg).
Now, "jython Main.py" works just fine ("kermits" is printed).
Here's the output from "jythonc --deep" at compile time:
-- start --
E:\projects\jytest\2>jythonc --deep Main.py
processing Main
processing bpkg.B
processing apkg.A
processing bpkg.__init__
Required packages:
Creating adapters:
Creating .java files:
B module
Main module
__init__ module
A module
Compiling .java to .class...
Compiling with args: ['E:\\programming\\java\\jdk1.3\\bin\\javac.exe', =
'-classpa
th', '"E:\\programming\\jython\\jython.jar;E:\\program =
files\\borland\\Interclie
nt\\interclient.jar;E:\\programming\\jython\\jython.jar;E:\\programming\\=
java\\j
2sdkee1.3\\lib\\j2ee.jar;E:\\programming\\java\\jakarta-tomcat-3.2.1\\jyt=
est\\WE
B-INF\\classes;.;.\\jpywork;;E:\\programming\\jython\\Tools\\jythonc;E:\\=
project
s\\jytest\\2\\.;E:\\programming\\jython\\Lib;e:\\programming\\Jython\\Lib=
;E:\\pr
ogramming\\jython"', '.\\jpywork\\bpkg\\B.java', =
'.\\jpywork\\Main.java', '.\\jp
ywork\\bpkg\\__init__.java', '.\\jpywork\\apkg\\A.java']
0 Note: Some input files use or override a deprecated API.
Note: Recompile with -deprecation for details.
-- end --
Next, we go to "./jpywork" and do a "java Main" and get:
-- start --
Java Traceback:
at org.python.core.Py.ImportError(Py.java:180)
at org.python.core.imp.load(imp.java:384)
at org.python.core.imp.load(imp.java:392)
at org.python.core.imp.importName(imp.java:448)
at org.python.core.imp.importName(imp.java:528)
at org.python.core.ImportFunction.load(__builtin__.java:989)
at org.python.core.ImportFunction.__call__(__builtin__.java:982)
at org.python.core.PyObject.__call__(PyObject.java:252)
at org.python.core.__builtin__.__import__(__builtin__.java:942)
at org.python.core.imp.importFromAs(imp.java:586)
at bpkg.B$_PyInner.main$3(B.java:54)
at bpkg.B$_PyInner.call_function(B.java:36)
at org.python.core.PyTableCode.call(PyTableCode.java:198)
at org.python.core.PyCode.call(PyCode.java:13)
at org.python.core.imp.createFromCode(imp.java:165)
at org.python.core.imp.createFromClass(imp.java:186)
at org.python.core.imp.loadPrecompiled(imp.java:258)
at org.python.core.imp.loadFromPath(imp.java:269)
at org.python.core.PyModule.impAttr(PyModule.java:39)
at org.python.core.imp.dottedFind(imp.java:428)
at org.python.core.imp.importName(imp.java:452)
at org.python.core.imp.importName(imp.java:528)
at org.python.core.ImportFunction.load(__builtin__.java:989)
at org.python.core.ImportFunction.__call__(__builtin__.java:982)
at org.python.core.PyObject.__call__(PyObject.java:252)
at org.python.core.__builtin__.__import__(__builtin__.java:942)
at org.python.core.imp.importFromAs(imp.java:586)
at Main$_PyInner.main$1(Main.java:34)
at Main$_PyInner.call_function(Main.java:26)
at org.python.core.PyTableCode.call(PyTableCode.java:198)
at org.python.core.PyCode.call(PyCode.java:13)
at org.python.core.imp.createFromCode(imp.java:165)
at org.python.core.Py.runMain(Py.java:818)
at Main.main(Main.java:49)
Traceback (innermost last):
File "E:\projects\jytest\2\Main.py", line 0, in main
File "E:\projects\jytest\2\bpkg\B.py", line 0, in main
ImportError: no module named apkg
-- end --
Taking a look at the ./jpywork directory shows that __init__-s (.java, =
.class and $_PyInner.class) have only been compiled for bpkg, but not =
for apkg.
I tried passing it multiple arguments to compile, but it then compiled =
it to a different "package level".
=20
Now, if we uncomment the first line in Main.py to also "from apkg.A =
import A" it works just fine (but importing all modules from the main =
application seems an ugly hack).
Any comments will be very appreciated.
Best regards,
Juris.
P.S. I hope this is on-topic for this list, since it _might_ be a =
jythonc bug. If not - let me know and forgive me this time :-).
|
|
From: Christine Hall<re...@tr...> - 2001-04-06 15:15:11
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD><TITLE></TITLE> <META content="text/html; charset=iso-8859-1" http-equiv=Content-Type> <META content="MSHTML 5.00.2314.1000" name=GENERATOR></HEAD> <BODY bgColor=#ffffff><img src="http://report.trafficmagnet.net/report/tr/get.php?referemail= jyt...@li... " width=1 height=1 border=0><FONT face=Arial size=2> <P>Hello,<BR></P> <P>I visited <A href=http://www.jython.org>www.jython.org</A> </A> and I noticed that you are not listed on some search engines. I am sure you can increase the number of people who visit <A href=http://www.jython.org>www.jython.org</A> </A>. Do you know TrafficMagnet? TrafficMagnet is a unique technology that automatically submits your web site to over 300,000+ search engines and directories every month. This is a very low-cost and effective way of advertising your site. </P> <P>To check our prices and submit <A href=http://www.jython.org>www.jython.org</A> </A> to 300,000+ search engines, go to <a href="http://report.trafficmagnet.net/report/tr/click.php?referemail= jyt...@li... ">TrafficMagnet.net</A></P> <P>I would love to hear from you. </P> <P>Best Regards,<BR>Christine Hall<BR>Sales & Marketing<BR><a href="http://report.trafficmagnet.net/report/tr/click.php?referemail= jyt...@li... ">www.TrafficMagnet.net</A> <STYLE type=text/css>.button { BACKGROUND-COLOR: #cc0000; COLOR: #ffffff; FONT-WEIGHT: bold } </STYLE> </P> <P> <TABLE border=0 cellPadding=0 cellSpacing=0 width=507> <TBODY> <TR> <TD width=149><a href="http://report.trafficmagnet.net/report/tr/click.php?referemail= jyt...@li... "><IMG border=0 height=159 src="http://image4.trafficmagnet.net/trafficmagnet/magnet.jpg" width=149></A></TD> <TD width=59><a href="http://report.trafficmagnet.net/report/tr/click.php?referemail= jyt...@li... "><IMG border=0 height=159 src="http://image4.trafficmagnet.net/trafficmagnet/blitz.gif" width=59></A></TD> <TD width=253> <TABLE border=0 cellPadding=0 cellSpacing=0> <TBODY> <TR> <TD height=194 rowSpan=3 width=21><a href="http://report.trafficmagnet.net/report/tr/click.php?referemail= jyt...@li... "><IMG border=0 height=194 src="http://image4.trafficmagnet.net/trafficmagnet/frameleft.jpg" width=21></A></TD> <TD height=24 width=210><a href="http://report.trafficmagnet.net/report/tr/click.php?referemail= jyt...@li... "><IMG border=0 height=24 src="http://image4.trafficmagnet.net/trafficmagnet/frametop.jpg" width=210></A></TD> <TD height=194 rowSpan=3 width=22><a href="http://report.trafficmagnet.net/report/tr/click.php?referemail= jyt...@li... "><IMG border=0 height=194 src="http://image4.trafficmagnet.net/trafficmagnet/frameright.jpg" width=22></A></TD></TR> <TR> <TD> <A Href = http://www.jython.org><IMG Src = http://image6.trafficmagnet.net/image61/1/98/img302.jpg Border=0 width="210" height="141"></A> </A> </TD></TR> <TR> <TD height=25 width=210><a href="http://report.trafficmagnet.net/report/tr/click.php?referemail= jyt...@li... "><IMG border=0 height=25 src="http://image4.trafficmagnet.net/trafficmagnet/framebottom.jpg" width=210></A></TD></TR></TBODY></TABLE></TD> <TD width=239><a href="http://report.trafficmagnet.net/report/tr/click.php?referemail= jyt...@li... "><IMG border=0 height=175 src="http://image4.trafficmagnet.net/trafficmagnet/people.gif" width=239></A></TD></TR> <TR> <TD width=149><a href="http://report.trafficmagnet.net/report/tr/click.php?referemail= jyt...@li... "><IMG border=0 height=48 src="http://image4.trafficmagnet.net/trafficmagnet/brand.jpg" width=149></A></TD> <TD width=59> </TD> <TD align=middle vAlign=bottom width=253> <a href="http://report.trafficmagnet.net/report/tr/click.php?referemail= jyt...@li... "><IMG border=0 src="http://image4.trafficmagnet.net/trafficmagnet/signup.gif"></A> </TD> <TD align=right vAlign=bottom width=239> </TD></TR></TBODY></TABLE></FONT></P></BODY></HTML> |
|
From: German M. <ger...@de...> - 2001-04-05 14:00:24
|
Hi everybody,
Before anything else, sorry for my English.
I don't know if this is message should go in jython-users
list or in the jython-dev list, so I apologize in advance
if it is in the wrong place.
I'm new in the list, but I used JPython (now Jython) on and
off for about 2 years.
I have an application written in Java that uses Jython for
the annoying business details, as a way for my customers
to customize the application for their needs.
Anything goes OK, but I'm concerned about the performance.
In a standard Java application, you can use a Java Profiler
(there are a lot) to see where the performance bottleneck
is.
In the case of a Jython code, those profilers come up with a
useless conclusion: the time is consumed in
PythonInterpreter.exec(PyCode compiledPyCode).
I'm looking for a tool that show me the time elapsed in
each Jython function or method.
Having found nothing in a quick search on Google and with
the same result in this lists, I've made some changes to
PyTableCode.java, so when I execute 'jython Test.py',
where Test.py is:
## ----------------------------------------
class TestClass:
def __init__(self):
self.a = 1
def __str__(self):
return str(self.a)
def printFunction(_testClass):
print str(_testClass)
def createFunction():
return TestClass()
_testClass = createFunction()
printFunction(_testClass)
## ----------------------------------------
I get this result:
## ----------------------------------------
begin - time:986420318682 - code:?
begin - time:986420318685 - code:TestClass
end - time:986420318686
begin - time:986420318686 - code:createFunction
begin - time:986420318687 - code:__main__.TestClass.__init__
end - time:986420318687
end - time:986420318687
begin - time:986420318688 - code:__main__.TestClass.printFunction
begin - time:986420318691 - code:__main__.TestClass.__str__
end - time:986420318697
end - time:986420318701
end - time:986420318701
## ----------------------------------------
The numbers are java.lang.System.currentTimeMillis() calls.
The next step is to write a program to analize this output.
But, before going on with my efforts, I wish to ask you some
questions.
0. There is some tool already done to do this job?
1. If not... What do you think of my aproach?
2. Is someone else interested in profiling jython code?
Thanks in advance for your time.
German Morales
|
|
From: Rita de G. <R.d...@he...> - 2001-04-05 09:48:47
|
Vijf jaar voordat deze foto's werden genomen werd bij mij diagnose reumatische artritis gesteld en als zodanig ook behandeld. Niets hielp. Toen de ziekte zich zo manifesteerde zoals u hieronder kunt zien.......... http://www.naardedokter.com/testimonials/sys_lup_eryth.htm |
|
From: <bc...@wo...> - 2001-04-04 21:45:35
|
[Robert W. Bill]
>Hello all,
>
>I was curious about the builtin "coerce" and what it should do
>with non-numeric types.
>
>Currently in CPython
>>>> coerce(1,"a")
>Traceback (most recent call last):
> File "<stdin>", line 1, in ?
>TypeError: number coercion failed
>>>>
>
>Currently in Jython
>>>> coerce(1, "a")
>(1, 'a') <-- note: not the same type
>>>>
>
>It seems the typeerror should be raised, but as always, it's likely
>there's something I've missed or misunderstood (maybe in PEP208 or
>elsewhere). Sorry if I'm off yet again, but I was wondering if the
>fall-through return of __builtin__.java::coerce should instead raise the
>TypeError("number coercion failed").
I agree with your patch.
regards,
finn
|
|
From: Garcia, M. <mg...@Bu...> - 2001-04-04 15:02:16
|
Hey Thomas, Here is what works for me. Its a small client to an EJB: Code follows: =========================================== import java from java.lang import Object,StringBuffer,String from javax.naming import * from java.util import * from javax.rmi import * from java.io import * from com.oppen.pb.ejb.Mailer import * class Client: def __init__(self): self.doNothing = 0 self.p = Properties() self.jndiContext = InitialContext() self.ref = Object() def getInitialContext(self): self.p.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.TengahInitialContextFactory") self.p.put(Context.PROVIDER_URL, "t3://localhost:7001") return InitialContext(self.p) def getRemote(self,jndiContext): self.jndiContext = self.getInitialContext() # self.ref = jndiContext.lookup("CompositionControllerHome") # home = PortableRemoteObject.narrow(self.ref,CompositionControllerHome.class) #Create a remote reference to the stateless bean home = jndiContext.lookup("MailerHome") mailer = home.create() print 'CONNECTION SUCCESS!!' return mailer if __name__ == '__main__': print 'in the body of app' a = Client() print 'object creation' ctx = a.getInitialContext() rem = a.getRemote(ctx) print rem.testReturn() to = [".com",".com"] frm = ".com" cc = [".com"] bcc = [".com"] subject = "Not a whole lot!" message = "Test message from mailer EJB." rem.sendMessage(to,frm,cc,bcc,subject,message)============================== ============= Hope this helps. The jist is that in main I instantiate a new Client, then call getInitialContext which returns an InitialContext. Then I call getRemote passing it the InitialContext from the previous call. getRemote gives me the remote reference I need to then call a test method rem.testReturn(). The last thing I do (this is an java mail bean by the way) is set up some variables and pass it to rem.sendMessage() which sends an email. have fun. Mick -----Original Message----- From: Thomas Bang Biilmann To: Jython Dev (E-mail) Sent: 4/4/01 7:54 AM Subject: [Jython-dev] RE: EJB access from Jython In addition to the question posted previously, I can now add the following: I've tried something like this: ... from vm import SimpleBean from vm import SimpleBeanHome from javax.naming import Context from javax.naming import InitialContext from javax.rmi import PortableRemoteObject initCtx = InitialContext() sbHomeRef = initCtx.lookup('ejb/SimpleBean') ... from within my Jython script. Until this point, everything works fine. This is very similar to the "standard" way of looking up an EJB from a J2EE program. However, when you in Java at this point would write: sbHome = (SimpleBeanHome) PortableRemoteObject.narrow(sbHomeRef, SimpleBeanHome.class); sb = sbHome.create(); next, in Jython I'm not sure how to go about this? How can I get the remote interface created? Cheers, Thomas > -----Original Message----- > From: Thomas Bang Biilmann > Sent: 3. april 2001 16:50 > To: Jython Dev (E-mail) > Subject: EJB access from Jython > > Hi. > > I'm currently experimenting with Jython scripting inside an > EJB deployed to Borland AppServer 4.5. The EJB (a stateful > session bean) is up and running, e.g. I can issue a simple > Jython script from the client and get the script executed on > the server. Now, I need to get access to other EJBs from the > bean implementing Jython scripting. I know that in the case > of beans (not EJBs, but JavaBeans), this is done via > registerBean/lookupBean or declareBean, but when it comes to > "looking up" an EJB, I'm lacking knowledge. How can this be done? > > /Thomas _______________________________________________ Jython-dev mailing list Jyt...@li... http://lists.sourceforge.net/lists/listinfo/jython-dev |
|
From: Thomas B. B. <tb...@sy...> - 2001-04-04 11:54:26
|
In addition to the question posted previously, I can now add the following:
I've tried something like this:
...
from vm import SimpleBean
from vm import SimpleBeanHome
from javax.naming import Context
from javax.naming import InitialContext
from javax.rmi import PortableRemoteObject
initCtx = InitialContext()
sbHomeRef = initCtx.lookup('ejb/SimpleBean')
...
from within my Jython script. Until this point, everything works fine. This
is very similar to the "standard" way of looking up an EJB from a J2EE
program. However, when you in Java at this point would write:
sbHome = (SimpleBeanHome)
PortableRemoteObject.narrow(sbHomeRef,
SimpleBeanHome.class);
sb = sbHome.create();
next, in Jython I'm not sure how to go about this? How can I get the remote
interface created?
Cheers,
Thomas
> -----Original Message-----
> From: Thomas Bang Biilmann
> Sent: 3. april 2001 16:50
> To: Jython Dev (E-mail)
> Subject: EJB access from Jython
>
> Hi.
>
> I'm currently experimenting with Jython scripting inside an
> EJB deployed to Borland AppServer 4.5. The EJB (a stateful
> session bean) is up and running, e.g. I can issue a simple
> Jython script from the client and get the script executed on
> the server. Now, I need to get access to other EJBs from the
> bean implementing Jython scripting. I know that in the case
> of beans (not EJBs, but JavaBeans), this is done via
> registerBean/lookupBean or declareBean, but when it comes to
> "looking up" an EJB, I'm lacking knowledge. How can this be done?
>
> /Thomas
|
|
From: Marc K. <MK...@wa...> - 2001-04-03 20:26:03
|
Hi again,
I'm quite new to Jython and Java (a few days). Here is a piece of code I =
wrote to sub-class the SerialPortEventListener of the javax.comm =
package:
class MySerialPortEventListener (comm.SerialPortEventListener):
def serialEvent (self, Event):
print Event
try:
IBuf =3D '--------'
ILen =3D IStream.available()
while ILen > 0:
INum =3D IStream.read(IBuf)
print 'Read: OK', ILen, INum, IBuf
ILen =3D IStream.available()
except:
raise
I get the following result for each character sent to the serial port =
(with help of a connected PSION)
javax.comm.SerialPortEvent[source=3DCOM2]
Read: OK 1 1 --------
What goes right:
- The EventListener works and is fired correctly
- The InputStream reports that data is available (1 byte)
- The InputStream.read method call reports that it has read data
What goes wrong:
- The buffer doesn't contain any data except the 8 '-'s that I have put =
in it for initialising
Please help, ... what am I missing?!?
(The other way around works. I managed to send data)
Thanks for any help and, once again, 'Jython is great'
Marc
|
|
From: Thomas B. B. <tb...@sy...> - 2001-04-03 14:49:53
|
Hi. I'm currently experimenting with Jython scripting inside an EJB deployed to Borland AppServer 4.5. The EJB (a stateful session bean) is up and running, e.g. I can issue a simple Jython script from the client and get the script executed on the server. Now, I need to get access to other EJBs from the bean implementing Jython scripting. I know that in the case of beans (not EJBs, but JavaBeans), this is done via registerBean/lookupBean or declareBean, but when it comes to "looking up" an EJB, I'm lacking knowledge. How can this be done? /Thomas |
|
From: Andy B. <ab...@ne...> - 2001-04-03 03:51:10
|
Hi, Love jython, Cannot get shelves to work since (as the readme says) bsddb is not implemented. This is a pretty important piece of python that is missing - is there a reason for this? Any chance of getting shelve working in the next release? Is it just python code that requires porting or simething important behind the scenes...? thanks for your continuing good work, -Andy Bulka Australia |
|
From: Garcia, M. <mg...@Bu...> - 2001-04-02 22:15:54
|
Try the following: ======================== from jarray import array >>> myList=array([0,2,4,6,8,10,12,14,16,18,20],'i') >>> def testMethod(someList): ... for index in someList: ... print index ... >>> testMethod(myList) 0 2 4 6 8 10 12 14 16 18 20 >>> simalarly using a Java List... >>> myList = ArrayList() >>> myList.add(5);myList.add(10);myList.add(15) >>> testMethod(myList) 5 10 15 >>> thats it. Mick -----Original Message----- From: Saravanan Balasubramani (EWU) To: 'jyt...@li...' Sent: 3/30/01 4:01 PM Subject: [Jython-dev] Passing Array/list parameters in Jython functions How to pass an array or list parameter to a Jython class function ? |
|
From: Steven M. <sr...@ya...> - 2001-04-02 00:57:18
|
Hello,
I have been trying to run some of the test cases in PyXML with
jython-2.1a1. First, it appears that someone on the PyXML team
is aware of and/or using jython as there is some special case
code to deal with importing. This is great news!
1) However, the 4DOM code appears to be using sys.hexversion to
decide whether unicode is available. Should jython set this by
default? While where at it, what about sys.version_info?
2) For some reason the SECOND occurrence of
xml.sax.make_parser() fails. I have included sample program and
output below.
tia,
Steven Marcus
import sys
print sys.platform
print sys.platform[:4]
try:
print hex(sys.hexversion)
except AttributeError:
print "no sys.hexversion"
try:
print sys.version_info
except AttributeError:
print "no sys.version_info"
from xml.sax import make_parser
parser = make_parser()
print parser
parser = make_parser()
print parser
# OUTPUT:
# java1.3.0
# java
# no sys.hexversion
# no sys.version_info
# <xml.sax.drivers2.drv_xmlproc.XmlprocDriver instance at
1514246354>
# Traceback (innermost last):
# File "info.py", line 28, in ?
# File "/usr/lib/python1.5/site-packages/xml/sax/sax2exts.py",
line 34, in make_parser
# File "/usr/lib/python1.5/site-packages/xml/sax/saxexts.py",
line 70, in make_parser
# File "/usr/lib/python1.5/site-packages/xml/sax/saxexts.py",
line 38, in _create_parser
# File "/usr/lib/python1.5/site-packages/xml/sax/saxexts.py",
line 74, in _create_parser
# TypeError: __init__() takes at least 2 arguments (1 given)
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/?.refer=text
|
|
From: Ype K. <yk...@xs...> - 2001-04-01 22:35:03
|
Marc, >Hi, > >I just started writing a CNC package in Python for the SimpleStep controller >board. This controller board receives commands through the serial port. I >managed this with Mark Hammond's Win extensions for Python, but I consider >not to continue this way because I'ld like my programs to be portable. As >Python doesn't support native serial IO support, I looked at Jython. As far >as I could see, the Jython distribution doesn't include the javax.comm API >which I found at java.sun.com. So my question is: How can I get the >javax.comm API working with Jython? Normally, if you can call something from Java you can call it from Jython. Just put it on the class path (like classes.zip for java.lang.*) for the jython interpreter and then use the following in a jython program: from javax.comm import * or import javax Good luck, Ype |
|
From: <ti...@ca...> - 2001-04-01 19:19:25
|
-> I just started writing a CNC package in Python for the SimpleStep controller -> board. This controller board receives commands through the serial port. I -> managed this with Mark Hammond's Win extensions for Python, but I consider -> not to continue this way because I'ld like my programs to be portable. As -> Python doesn't support native serial IO support, I looked at Jython. As far -> as I could see, the Jython distribution doesn't include the javax.comm API -> which I found at java.sun.com. So my question is: How can I get the -> javax.comm API working with Jython? If you install javax.comm so that Java programs can use it, then you'll be able to use it from with Jython without any changes. New (or old) Java packages don't need to be "ported" to Jython... --titus |
|
From: Marc K. <MK...@wa...> - 2001-04-01 19:15:25
|
Hi, I just started writing a CNC package in Python for the SimpleStep controller board. This controller board receives commands through the serial port. I managed this with Mark Hammond's Win extensions for Python, but I consider not to continue this way because I'ld like my programs to be portable. As Python doesn't support native serial IO support, I looked at Jython. As far as I could see, the Jython distribution doesn't include the javax.comm API which I found at java.sun.com. So my question is: How can I get the javax.comm API working with Jython? By the way, ... I believe that you are doing a great job and your work will help people like me (I'm and old fashioned 3GL programmer) to use a rather simple language like Python to begin explore the big Java-world. Thanks Marc |
|
From: Robert W. B. <rb...@di...> - 2001-03-31 20:13:52
|
Hello all,
I was curious about the builtin "coerce" and what it should do
with non-numeric types.
Currently in CPython
>>> coerce(1,"a")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: number coercion failed
>>>
Currently in Jython
>>> coerce(1, "a")
(1, 'a') <-- note: not the same type
>>>
It seems the typeerror should be raised, but as always, it's likely
there's something I've missed or misunderstood (maybe in PEP208 or
elsewhere). Sorry if I'm off yet again, but I was wondering if the
fall-through return of __builtin__.java::coerce should instead raise the
TypeError("number coercion failed").
If so...
=========================================================================
--- __builtin__.java Sun Mar 4 12:12:34 2001
+++ __builtin__.java Sat Mar 31 13:41:42 2001
@@ -205,7 +205,7 @@
return new PyTuple(new PyObject[] {(PyObject)ctmp, o2});
}
}
- return new PyTuple(new PyObject[] {o1, o2});
+ throw Py.TypeError("number coercion failed");
}
public static PyCode compile(String data, String filename, String
type) {
==========================================================================
or...
Index: __builtin__.java
===================================================================
RCS file: /cvsroot/jython/jython/org/python/core/__builtin__.java,v
retrieving revision 2.31
diff -r2.31 __builtin__.java
208c208
< return new PyTuple(new PyObject[] {o1, o2});
---
> throw Py.TypeError("number coercion failed");
Tnx,
Robert
|