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: Ype K. <yk...@xs...> - 2001-01-29 22:47:02
|
"""
stringbuffer.py: mutable string built on java.lang.StringBuffer.
The idea is to save as many string object creations as possible
while still be about as fast as string's, when implemented
in Java. This python module is intended as a prototype.
The itch:
I needed java.lang.StringBuffer functionality in jython
on the receiving side of a socket.
I grew tired of writing:
buf += sock.recv(maxSize)
which creates a new buf everytime
sock.recv(maxSize) is called. Note that sock.recv()
may return as little as it likes, depending on
network traffic conditions.
The alternative of keeping a list of received
strings did not really appeal to me.
The questions:
- This may have been done umpteen times before, when so
could someone please tell me?
- I added the standard string methods.
Only when these originally return a string I have them put
the result back into the stringbuffer.
Methods that return something else work as if they
were used on a string.
Is this the right approach? Esp. for split() and friends?
- I don't know whether I handled python default arguments
correctly, eg:
def count(self, sub, start = None, end = None):
if start == None:
if end == None:
return str(self).count(sub)
else:
return str(self).count(sub, 0, end)
elif end == None:
return str(self).count(sub, start)
else:
return str(self).count(sub, start, end)
(str(self) should disappear in the java version ...)
- Is an extend() method needed? It is marked as experimental
in my python 2.0 documentation.
- Should slicing be allowed with other steps than 1?
- pop() also works for slices, is that ok.?
Aside: in the sort() method this line gives an internal compiler error:
l = [self[i] for i in range(len(self))] # internal compiler error:
name i (jython2.0a3)
Why?
"""
"""
See PEP 203 for the methods to emulate the
operators += and *= : __iadd__ and __imul__.
Limitations:
- Slicing should be done with step 1, and no extended slicing is
provided (how should this be done?).
- Many methods still create string objects, by using str(self).
In java charAt() and getChars() can be used instead.
- Sorting has no compare function yet.
Not yet tested:
- insert()
- *=
- lots more: test_string.py could be used, adapting the test function
to look up the result in
the stringbuffer itself where appropriate.
From the Jython faq:
5.1. Java classes that emulate Jython Dictionaries and Sequences
In order to emulate Dictionaries and Sequences, first your Java
class must "extend" the org.python.core.PyObject class.
The following methods can then be defined on your class in order to
emulate these basic Jython types:
public PyObject __finditem__(PyObject key);
public void __setitem__(PyObject key, PyObject value);
public void __delitem__(PyObject key);
Additionally, you might want to throw the
org.python.core.Py.KeyError object if you have any exceptions
(Note, you need not declare the Java method as throwing anything.)
"""
from java.lang import StringBuffer
from java.lang import String
from org.python.core import PySlice
from org.python.core import PyList # sort from PyList doesn't work.
class stringbuffer:
""" basic customization """
def __init__(self, s = None):
if s == None: self.sb = StringBuffer()
else: self.sb = StringBuffer(s)
def dump(self): print self.sb.__class__, '<' + str(self) + '>'
def __repr__(self): # repr(sb)
return 'stringbuffer(' + repr(str(self)) + ')'
def __str__(self): # str(sb)
return self.sb.toString() # java.lang.StringBuffer.toString()
def __len__(self):
return self.sb.length()
def __nonzero__(self):
return self.sb.length() > 0
""" sequence type customization """
def ji(self, i): # java index
if i < 0:
return i + self.sb.length()
else:
return i
def sliceJavaDefaults(self, sl):
assert sl.step == 1
if sl.start == None: b = 0
else: b = self.ji(sl.start)
if sl.stop == None: e = self.sb.length()
else: e = self.ji(sl.stop)
return b, e
def __getitem__(self, i): # self[i], key may be slice
if not isinstance(i, PySlice):
return self.sb.charAt(self.ji(i))
else:
b, e = self.sliceJavaDefaults(i)
return self.sb.substring(b, e)
def __setitem__(self, i, c): # self[i] = c, key may be slice
if not isinstance(i, PySlice):
self.sb.setCharAt(self.ji(i), c)
else:
b, e = self.sliceJavaDefaults(i)
self.sb.replace(b, e, c)
def __delitem__(self, i): # del self[i], key may be slice
if not isinstance(i, PySlice):
self.sb.deleteCharAt(self.ji(i))
else:
b, e = self.sliceJavaDefaults(i)
self.sb.delete(b, e)
def min(self): return min(str(self))
def max(self): return max(str(self))
""" `numeric' operators, most can be left to string/String """
def __add__(self, s2): # self + s2
sum = stringbuffer(str(self))
sum.append(s2)
return sum
def __radd__(self, s2): # s2 + self
sbf = stringbuffer(str(s))
sbf.append(self.sb)
return sbf
def __iadd__(self, s2): # self += s2
self.append(s2)
return self
def __mul__(self, i): # self * i
return stringbuffer(str(self) * i)
def __rmul__(self, i): # i * self
return stringbuffer(str(self) * i)
def __imul__(self, i): # self *= i
# see PyString.java for better stuff.
if i > 1: self.append(str(self) * (i - 1))
elif i == 0: del self[:]
return self
""" methods that must be provided for mutable sequences """
def append(self, s): self.sb.append(str(s))
"""
Does append() need an ensureCapacity()?
In python append() is meant for single elements,
but python does not have the character type.
This append() works for any argument that can be str()'d.
"""
def count(self, sub, start = None, end = None):
""" nested if testing 4 cases: ok? """
if start == None:
if end == None: return str(self).count(sub)
else: return str(self).count(sub, 0, end)
elif end == None: return str(self).count(sub, start)
else: return str(self).count(sub, start, end)
def index(self, sub, start = None, end = None):
if start == None:
if end == None: return str(self).index(sub)
else: return str(self).index(sub, 0, end)
elif end == None: return str(self).index(sub, start)
else: return str(self).index(sub, start, end)
def pop(self, i = None): # also works for slices
if i == None: i = -1
"""
inlined:
c = self.__getitem__(i)
self.__delitem__(i)
"""
if not isinstance(i, PySlice):
jvi = self.ji(i)
c = self.sb.charAt(jvi)
self.sb.deleteCharAt(jvi)
else:
b, e = self.provideSliceDefaults(i)
c = self.sb.substring(b, e)
self.sb.delete(b, e)
return c
def remove(self, c): # remove first occurrence of string c
i = self.index(c) # raises ValueError
lc = len(c)
if lc == 1: self.sb.deleteCharAt(i)
else: self.sb.delete(i, i + lc)
def sort(self): # sort the chars standard order, no compare function yet
""" a long detour via the other mutable sequence """
# l = [self[i] for i in range(len(self))] # internal compiler
error: name i (jython2.0a3)
l = []
for i in range(len(self)):
l.append(self[i])
l.sort()
self.sb = StringBuffer(''.join(l))
def reverse(self): self.sb.reverse()
""" remaining java StringBuffer methods """
def extend(self, s): self.append(s) # still experimental in python?
def capacity(self): return self.sb.capacity()
def ensureCapacity(self, cap): return self.sb.ensureCapacity(cap)
""" superfluous: use of StringBuffer.insert() """
def setLength(self, newLength): self.sb.setLength(newLength) #
truncate or add null chars.
"""
Almost all python string methods are also useful for stringbuffers.
These are probably better implemented by getting inspiration from
PyString.java.
Straightforward adapting to putting the result back will do in most of the
cases...
"""
def capitalize(self): self.sb = StringBuffer(str(self).capitalize())
def center(self): self.sb = StringBuffer(str(self).center())
def endswith(self, suffix, start = None, end = None):
if start == None:
if end == None: return str(self).endswith(sub)
else: return str(self).endswith(sub, 0, end)
elif end == None: return str(self).endswith(sub, start)
else: return str(self).endswith(sub, start, end)
def expandtabs(self, suffix, start = None, end = None):
if start == None:
if end == None: self.sb =
StringBuffer(str(self).expandtabs(suffix))
else: self.sb = StringBuffer(str(self).expandtabs(suffix, 0, end))
elif end == None: self.sb =
StringBuffer(str(self).expandtabs(suffix, start))
else: self.sb = StringBuffer(str(self).expandtabs(suffix, start, end))
def find(self, sub, start = None, end = None):
if start == None:
if end == None: return str(self).find(sub)
else: return str(self).find(sub, 0, end)
elif end == None: return str(self).find(sub, start)
else: return str(self).find(sub, start, end)
def isalnum(self): return str(self).isalnum()
def isalpha(self): return str(self).isalpha()
def isdigit(self): return str(self).isdigit()
def islower(self): return str(self).islower()
def isspace(self): return str(self).isspace()
def istitle(self): return str(self).istitle()
def isupper(self): return str(self).isupper()
def isupper(self, seq): return str(self).join(seq)
def join(self, seq): return str(self).join(seq)
def ljust(self): self.sb = StringBuffer(str(self).ljust())
def lower(self): self.sb = StringBuffer(str(self).lower())
def lstrip(self): self.sb = StringBuffer(str(self).lstrip())
def replace(old,new,maxsplit = None):
if maxsplit == None: self.sb = StringBuffer(str(self).replace(old,new))
else: self.sb = StringBuffer(str(self).replace(old,new,maxsplit))
def rfind(self, sub, start = None, end = None):
if start == None:
if end == None: return str(self).rfind(sub)
else: return str(self).rfind(sub, 0, end)
elif end == None: return str(self).rfind(sub, start)
else: return str(self).rfind(sub, start, end)
def rindex(self, sub, start = None, end = None):
if start == None:
if end == None: return str(self).rindex(sub)
else: return str(self).rindex(sub, 0, end)
elif end == None: return str(self).rindex(sub, start)
else: return str(self).rindex(sub, start, end)
def rjust(self): self.sb = StringBuffer(str(self).rjust())
def rstrip(self): self.sb = StringBuffer(str(self).rstrip())
def split(self, sep, maxsplit = None): # returns a list of
strings, not stringbuffers
if maxsplit == None:
return str(self).split(sep)
else:
return str(self).split(sep, maxsplit)
def splitlines(self, keepends = None): # returns a list of
strings, not stringbuffers
if keepends == None:
return str(self).splitlines(sep)
else:
return str(self).splitlines(sep, keepends)
def startswith(self, suffix, start = None, end = None):
if start == None:
if end == None: return str(self).startswith(sub)
else: return str(self).startswith(sub, 0, end)
elif end == None: return str(self).startswith(sub, start)
else: return str(self).startswith(sub, start, end)
def strip(self): self.sb = StringBuffer(str(self).strip())
def swapcase(self): self.sb = StringBuffer(str(self).swapcase())
def title(self): self.sb = StringBuffer(str(self).title())
def translate(self, table, deletechars = None):
if deletechars == None:
self.sb = StringBuffer(str(self).translate(table))
else:
self.sb = StringBuffer(str(self).translate(table, deletechars))
def upper(self): self.sb = StringBuffer(str(self).upper())
if __name__ == '__main__':
# some initial tests, all empty strings
sb1 = stringbuffer()
assert not sb1
assert len(sb1) == 0
assert str(sb1) == ''
assert sb1[:0] == ''
assert str(sb1 + sb1) == ''
sb2 = stringbuffer()
sb2 += sb1
assert not sb2
sb2 += ''
assert len(sb2) == 0
sb2.append(sb1)
assert len(sb2) == 0
# two non empty strings, indexing and slicing, __getitem__
s1 = 'a'
s2 = 'bc'
sb1 = stringbuffer(s1)
assert len(sb1) == len(s1)
sb2 = stringbuffer(s2)
assert len(sb2) == len(s2)
sb1 += s2
assert str(sb1) == (s1 + s2)
assert sb1[:len(s1)] == s1
assert sb1[len(s1):] == s2
assert sb1[0] == s1[0]
assert sb1[1] == s2[0]
assert sb1[2] == s2[1]
assert sb1[1:3] == s2
assert sb1[:] == (s1 + s2)
# __setitem__
sb1 = stringbuffer(3)
sb2 = sb1
sb1.setLength(3) # now three null chars
assert sb1[:] == '\0\0\0'
assert len(sb1) == 3
sb1[0] = 'a'
sb1[1] = 'b'
sb1[2] = 'c'
assert sb1 is sb2 # check mutability
assert sb1[:] == 'abc'
sb1[1] = 'd'
assert sb1[:] == 'adc'
assert sb1 is sb2
sb1[0:2] = 'de'
assert sb1[:] == 'dec'
sb1[2:2] = 'f'
assert sb1[:] == 'defc'
sb1 = stringbuffer('ghij')
sb2 = sb1
del sb1[0]
assert sb1[:] == 'hij'
assert sb1 is sb2
# __delitem__
sb1 = stringbuffer('ghij')
sb2 = sb1
del sb1[1:3]
assert sb1[:] == 'gj'
assert sb1 is sb2
# reverse
sb1 = stringbuffer('ghij')
sb2 = sb1
sb1.reverse()
assert sb1[:] == 'jihg'
assert sb1 is sb2
# negative indexes
assert sb1[-1] == 'g'
assert sb1[:-1] == 'jih'
sb1.remove('i')
assert sb1[:] == 'jhg'
try: sb1.remove('a')
except ValueError: pass
else: raise Exception, "should throw ValueError"
assert sb1[:] == 'jhg'
sb1.sort()
assert sb1[:] == 'ghj'
|
|
From: Samuele P. <pe...@in...> - 2001-01-29 14:12:47
|
Hi. [Finn] > >In that case, wouldn't > >that be nice to have a .sig attribute (or even .signature, which gets my > >vote, > >or .__signature__ or something) instead of (or -- for backwards > >compatibility > >-- in addition to) the docstring convention (or, as some might call it, > >"hack" ;-)? > > It would be nice, but I'm not entirely sure it is possible. The function > attributes are a runtime feature, the @sig is very much a compile time > feature. Given all the real problem and confusion sources that you listed, I don't think it is worth the effort. regards, Samuele Pedroni. |
|
From: <bc...@wo...> - 2001-01-29 13:56:52
|
[Magnus Lie Hetland] >Another thing Jython seems to be lacking: A dbm-style module. >(I'm sure dumbdbm works, but...) > >Aaron Watters' bplustree.py has a dbm-compatibility mode >which would make it a possible back-end entirely implemented >in Python: >http://www.pythonpros.com/arw/bplustree/ Have anyone tried it with Jython? I recall some problems regarding ints/longs, but I have forgotten the details. >There are also a few pure Java DBM implementations out >there: > >http://www.advogato.org/proj/jdbm/ >http://dev.w3.org/cvsweb/java/classes/org/w3c/tools/jdbm/ If anyone makes an dbm compatible wrapper for any of these packages, I gladly list them in the FAQ. Even without such a wrapper, the java packages are usefull but hardly worth special mentioning. If the licensing of the dbm java package can be resolved, the combined dbm module might make it into the distribution. As always, contribution are welcome. regards, finn |
|
From: <bc...@wo...> - 2001-01-29 13:55:32
|
[Magnus Lie Hetland] >I was just browsing the documentation at jython.org, and I read about the >convention with @sig in the docstring of functions. > >Since Python now (by version 2.1a) supports function attributes [1], I >assume this will be included in future (2.1?) versions of Jython. Yes, it will be part of jython 2.1. >In that case, wouldn't >that be nice to have a .sig attribute (or even .signature, which gets my >vote, >or .__signature__ or something) instead of (or -- for backwards >compatibility >-- in addition to) the docstring convention (or, as some might call it, >"hack" ;-)? It would be nice, but I'm not entirely sure it is possible. The function attributes are a runtime feature, the @sig is very much a compile time feature. We could add some addition requirement to the use of function attributes, like: - They must be specified as part of the class def - They must use the attribute syntax With something like this, it might be possible to detect function attribute syntacticly, but that would cause these two valid uses of function attribute to be ignored: class Foo: def bar(self): pass bar.__dict__['sig'] = "public void bar()" Foo.bar.sig = "public void bar()" >At least it seems this is the sort of thing function attributes was made >for... I'm guessing it was made to improve the runtime introspection of functions. Public/private methods in Zope springs to mind. The examples listed in the pep are also about runtime inspection. Adding static type info isn't used as an example in the pep. >Example of use: > >def setExpression(self, e): > # Do something... > pass >setExpression.signature = "public void setExpression(java.lang.String e)" > >(I'm sure it might be seen as a drawback that the signature must be set >outside >the function. I don't really feel it matters much...) It may also be assigned from outside the module. That would matter a little bit from the compiler's POV <wink>. regards, finn |
|
From: <bc...@wo...> - 2001-01-29 13:48:45
|
[Magnus Lie Hetland] >Quote from http://www.jython.org/docs/differences.html >> * Some builtin extension modules don't exist in Jython. >> * The following are under consideration (working code would make >> the decision much easier ;-) -- array, select, a >> dbm/gdbm/bsddb style module, Numeric, cmath. > >I would just like to mention Tim Hochberg's Java implementation of Numeric, >JNumeric [1] which works with JPython 1.1b1. I don't know if it works with >Jython 2.0, but I'm sure that it would, with a little tweaking... > >It just seems nice to have a numeric module available :-) > >[1] http://starship.python.net/~hochberg/ I think the lastest version is avilable here: http://members.home.net/tim.hochberg/ I have added an entry in the FAQ: http://jython.sourceforge.net/cgi-bin/faqw.py?req=all#4.3 Tim, feel free to expand on it, if you want to. regards, finn |
|
From: Roy B. <roy...@SE...> - 2001-01-29 07:39:48
|
There appears to be a problem on this page of your site.
On your page
http://www.jython.org/docs/api/org.python.util.PythonInterpreter.html
when you click on your link to
http://www.jython.org/docs/api/packages.html
you get the error: Not found
As recommended by the Robot Guidelines, this email is to explain our robot's
activities and to let you know about one of the broken links we encountered.
LinkWalker does not store or publish the content of your pages, but rather
uses the link information to update our map of the World Wide Web.
Are these reports helpful? I'd love some feedback. If you prefer not to
receive these occasional error notices please let me know.
Roy Bryant
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Roy Bryant, roy...@se...
President
SEVENtwentyfour Inc. ("Always watching the Web")
http://www.seventwentyfour.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
From: Magnus L. H. <ml...@id...> - 2001-01-28 01:15:47
|
Hi, again... Another thing Jython seems to be lacking: A dbm-style module. (I'm sure dumbdbm works, but...) Aaron Watters' bplustree.py has a dbm-compatibility mode which would make it a possible back-end entirely implemented in Python: http://www.pythonpros.com/arw/bplustree/ There are also a few pure Java DBM implementations out there: http://www.advogato.org/proj/jdbm/ http://dev.w3.org/cvsweb/java/classes/org/w3c/tools/jdbm/ (I'm sure there are many more...) -- Magnus Lie Hetland (magnus at hetland dot org) "Reality is what refuses to disappear when you stop believing in it" -- Philip K. Dick |
|
From: Magnus L. H. <ml...@id...> - 2001-01-28 00:49:28
|
Hi! Quote from http://www.jython.org/docs/differences.html > * Some builtin extension modules don't exist in Jython. > * The following are under consideration (working code would make > the decision much easier ;-) -- array, select, a > dbm/gdbm/bsddb style module, Numeric, cmath. I would just like to mention Tim Hochberg's Java implementation of Numeric, JNumeric [1] which works with JPython 1.1b1. I don't know if it works with Jython 2.0, but I'm sure that it would, with a little tweaking... It just seems nice to have a numeric module available :-) [1] http://starship.python.net/~hochberg/ -- Magnus Lie Hetland (magnus at hetland dot org) "Reality is what refuses to disappear when you stop believing in it" -- Philip K. Dick |
|
From: Magnus L. H. <ml...@id...> - 2001-01-27 23:20:31
|
Hi! I was just browsing the documentation at jython.org, and I read about the convention with @sig in the docstring of functions. Since Python now (by version 2.1a) supports function attributes [1], I assume this will be included in future (2.1?) versions of Jython. In that case, wouldn't that be nice to have a .sig attribute (or even .signature, which gets my vote, or .__signature__ or something) instead of (or -- for backwards compatibility -- in addition to) the docstring convention (or, as some might call it, "hack" ;-)? At least it seems this is the sort of thing function attributes was made for... Example of use: def setExpression(self, e): # Do something... pass setExpression.signature = "public void setExpression(java.lang.String e)" (I'm sure it might be seen as a drawback that the signature must be set outside the function. I don't really feel it matters much...) ([1] http://www.amk.ca/python/2.1) -- Magnus Lie Hetland (magnus at hetland dot org) "Reality is what refuses to disappear when you stop believing in it" -- Philip K. Dick |
|
From: <bc...@wo...> - 2001-01-26 11:52:31
|
[Brad Buchsbaum] >On the topic of coercion, currently (correct me if I'm wrong) when a java >numeric primitive (it, double, etc.) is accessed from jython code a >conversion takes place from the native java type to a PyNumber object. Correct. The concrete classes are PyInteger and PyFloat. [Description of jython's coolness snipped] >Is there any way that java primitives could be accessed "as-is" from within >Jython? I'm no expert on language implementation and I'm sure the types-sig have stronger and more well-founded opinions than I, but I don't think we can do it transparently. The tools I have seen described on c.l.py which performed analysis of the control flow and data types suggested that such analysis are dificult for python code both in theory and in practice. I know JimH felt very strongly about this topic (he was very numerical) and he might have been able to add some improvements. I can't. Doing it through some kind of explicit type syntax that is added to the python code is OTOH possible, but I'm not going to spearhead a syntax change to python. When the types-sig have convinced Guido of a design for explicit types, we will ofcourse add it to jython in a way that takes advantage of the possible speed improvements. regards, finn |
|
From: Brad B. <bbu...@uc...> - 2001-01-26 03:57:47
|
Hi, On the topic of coercion, currently (correct me if I'm wrong) when a java numeric primitive (it, double, etc.) is accessed from jython code a conversion takes place from the native java type to a PyNumber object. Now, since Python offers many features (slicing, operator overloading, function pointers, etc.) that are extremely useful from a numerical computing standpoint (hence the success of NumPy) and Java offers excellent and robust Matrix libraries, 2D & 3D graphics, excellent gui, an advanced imaging package -- and so on -- Jython holds a lot of potential in the numerical computing arena (see ViSad, a scientific visualization package which has incorporated JPython as a scripting feature). That said, the current treatment of java primitives as PyObjects is a barrier to jython emerging as a (fast) platform for numerical computing. Is there any way that java primitives could be accessed "as-is" from within Jython? Note that Numerical Python suffers from requiring a rag-bag of supplementary tools for graphing, imaging, etc. -- which are not generally cross-platform -- while Java offers all these things in existing libraries either put out by Sun or downloadable off the web and, of course, fully cross-platform. So, to me, Jython has vastly more potential as a numerical computing language than Python proper. Moreover, proprietary computing environments like Matlab, Mathematica, and S-Plus are all scrambling to provide "java links" into their own languages. None of these links will ever be as good as the Jython-Java connection, nor will those scripting languages ever be as good as Python for general computing. (See www.omegahat.org for a project that is trying to integrate the S language and java at the cost of considerable complexity). Brad Buchsbaum ----- Original Message ----- From: "Finn Bock" <bc...@wo...> To: <jyt...@li...> Cc: <jyt...@li...>; <jpy...@py...> Sent: Thursday, January 25, 2001 12:06 PM Subject: [JPython] New Coercion Model > Hi, > > I have been working on a change to the coercion model that matches the > change that CPython 2.1 have introduced. The change only affect the > implementation of PyObject and its subclasses. It have no effect on > python objects that define __coerce__ or any of the other __XXX__ number > methods. > > The effect of the change is that the __XXX__ number methods can receive > argument(s) that aren't of the same type as itself. It is then the (new) > responsibility of each __XXX__ method to check its argument and return > Py.NotImplemented if the operation cannot be done with such an argument. > As a result the __coerce_ex__ is no longer called. > > The patch, as I have it now, does not supply a backward compatiblity > mode and that is subject on which I'm seeking feedback: > > I would like to hear from you if you have coded your own PyObject > subclass which override any of the number methods. Take a look at the > "new" way that this can be coded (example below is taken from PyFloat) > and send me your feedback and comments. > > Adding backward compatibility is ofcourse possible, but it would mean we > have to carry around some kind of flag around (NEW_STYLE_NUMBER) and I > would rather avoid that if possible. I would also like to get rid of the > currect coercion code because it complicated and there are bugs in it. > > The benefit of the new coercion model is improved speed when mixing > object types in operations because it isn't necessary to create a > temporary object and improved control from an extension type because it > now gets the unmodified arguments pass to it. > > The full patch can be found here: > > http://sourceforge.net/patch/index.php?func=detailpatch&patch_id=103419&grou p_id=12867 > > A few example methods taken from PyFloat. It showns how the numeric > methods can be implemented under the new coercion mode: > > > public PyObject __add__(PyObject right) { > if (!canCoerce(right)) > return Py.NotImplemented; > double rightv = coerce(right); > return new PyFloat(value + rightv); > } > > public PyObject __radd__(PyObject left) { > return __add__(left); > } > > public PyObject __sub__(PyObject right) { > if (!canCoerce(right)) > return Py.NotImplemented; > double rightv = coerce(right); > return new PyFloat(value - rightv); > } > > public PyObject __rsub__(PyObject left) { > if (!canCoerce(left)) > return Py.NotImplemented; > double leftv = coerce(left); > return new PyFloat(leftv - value); > } > > private static final boolean canCoerce(PyObject other) { > return other instanceof PyFloat || other instanceof PyInteger || > other instanceof PyLong; > } > > private static final double coerce(PyObject other) { > if (other instanceof PyFloat) > return ((PyFloat) other).value; > else if (other instanceof PyInteger) > return ((PyInteger) other).getValue(); > else if (other instanceof PyLong) > return ((PyLong) other).doubleValue(); > else > throw Py.TypeError("xxx"); > } > > > regards, > finn > > _______________________________________________ > JPython-Interest maillist - JPy...@py... > http://mail.python.org/mailman/listinfo/jpython-interest > |
|
From: Karsten T. <ka...@Su...> - 2001-01-25 21:19:43
|
>>>>> "Finn" == Finn Bock <bc...@wo...> writes: Finn> How about returning "mtime / 1000.0" as a float number. This is Finn> already the case for CPython on macs. If any libraries fail to Finn> handle a float it is surely a bug in the library. I think that would be the most clean solution. It _must_ return a value which is compatible with the time library, and that is seconds. So time/1000.0 would be a very clean solution in my opinion. Karsten |
|
From: <bc...@wo...> - 2001-01-25 20:07:08
|
Hi, I have been working on a change to the coercion model that matches the change that CPython 2.1 have introduced. The change only affect the implementation of PyObject and its subclasses. It have no effect on python objects that define __coerce__ or any of the other __XXX__ number methods. The effect of the change is that the __XXX__ number methods can receive argument(s) that aren't of the same type as itself. It is then the (new) responsibility of each __XXX__ method to check its argument and return Py.NotImplemented if the operation cannot be done with such an argument. As a result the __coerce_ex__ is no longer called. The patch, as I have it now, does not supply a backward compatiblity mode and that is subject on which I'm seeking feedback: I would like to hear from you if you have coded your own PyObject subclass which override any of the number methods. Take a look at the "new" way that this can be coded (example below is taken from PyFloat) and send me your feedback and comments. Adding backward compatibility is ofcourse possible, but it would mean we have to carry around some kind of flag around (NEW_STYLE_NUMBER) and I would rather avoid that if possible. I would also like to get rid of the currect coercion code because it complicated and there are bugs in it. The benefit of the new coercion model is improved speed when mixing object types in operations because it isn't necessary to create a temporary object and improved control from an extension type because it now gets the unmodified arguments pass to it. The full patch can be found here: http://sourceforge.net/patch/index.php?func=detailpatch&patch_id=103419&group_id=12867 A few example methods taken from PyFloat. It showns how the numeric methods can be implemented under the new coercion mode: public PyObject __add__(PyObject right) { if (!canCoerce(right)) return Py.NotImplemented; double rightv = coerce(right); return new PyFloat(value + rightv); } public PyObject __radd__(PyObject left) { return __add__(left); } public PyObject __sub__(PyObject right) { if (!canCoerce(right)) return Py.NotImplemented; double rightv = coerce(right); return new PyFloat(value - rightv); } public PyObject __rsub__(PyObject left) { if (!canCoerce(left)) return Py.NotImplemented; double leftv = coerce(left); return new PyFloat(leftv - value); } private static final boolean canCoerce(PyObject other) { return other instanceof PyFloat || other instanceof PyInteger || other instanceof PyLong; } private static final double coerce(PyObject other) { if (other instanceof PyFloat) return ((PyFloat) other).value; else if (other instanceof PyInteger) return ((PyInteger) other).getValue(); else if (other instanceof PyLong) return ((PyLong) other).doubleValue(); else throw Py.TypeError("xxx"); } regards, finn |
|
From: <no...@so...> - 2001-01-25 19:59:16
|
Patch #103419 has been updated. Project: jython Category: None Status: Open Submitted by: bckfnn Assigned to : nobody Summary: Reworked coercion model ------------------------------------------------------- For more info, visit: http://sourceforge.net/patch/?func=detailpatch&patch_id=103419&group_id=12867 |
|
From: Ed de J. <ede...@bu...> - 2001-01-25 18:00:51
|
Hi, when I click on the download class I get page not found.... I am currently a Java developer and I am looking for a good scripting language why jython as opposed to perl etc. Please advise tia ed ;) |
|
From: <bc...@wo...> - 2001-01-25 14:08:58
|
[brian zimmer] >As some might be aware, CPython is getting ready to release version 2.1 >with a number of new features: > >http://www.amk.ca/python/2.1/ > >I was wondering if anyone has started adding these to Jython? I'm currently working on the coercion model and rich comparison. >If not I'd like to offer assistance in getting Jython up to speed. I have added the major new features as task to the task manager on sourceforge. If anyone wants to tackle a task or fix a bug they can post their intention here (to avoid duplicate work). Patches can be posted to the patch manager. http://sourceforge.net/pm/task.php?group_project_id=6960&group_id=12867&func=browse http://sourceforge.net/patch/?group_id=12867 Developer rights are granted to patch writers with a proven history of atleast 1 non-trivial patch. In addition to the tasks on the tasklist, I hope these tests from CPython-2.1 will succeed by the time Jython-2.1 is released. import regrtest tests = [ 'test_atexit', 'test_augassign', 'test_binascii', 'test_binhex', 'test_bisect', 'test_bufio', 'test_builtin', 'test_cfgparser', 'test_cgi', 'test_charmapcodec', 'test_class', 'test_coercion', 'test_compare', 'test_compile', 'test_contains', 'test_cookie', 'test_copy_reg', 'test_cpickle', # 'test_crypt', 'test_dospath', 'test_dumbdbm', 'test_exceptions', 'test_extcall', 'test_file', 'test_format', 'test_funcattrs', 'test_getopt', 'test_grammar', 'test_gzip', 'test_hash', 'test_import', 'test_long', 'test_mailbox', 'test_math', 'test_md5', 'test_mimetools', 'test_MimeWriter', 'test_ntpath', 'test_operations', 'test_operator', 'test_pickle', 'test_pkg', 'test_posixpath', 'test_pow', 'test_re', 'test_rfc822', 'test_richcmp', 'test_sha', 'test_socket', 'test_sre', 'test_strftime', 'test_string', 'test_StringIO', 'test_struct', 'test_thread', 'test_threadedtempfile', 'test_time', 'test_tokenize', 'test_types', 'test_ucn', 'test_unicode', 'test_unpack', 'test_urllib', 'test_urlparse', 'test_userdict', 'test_userlist', 'test_userstring', 'test_xmllib', 'test_xreadline', 'test_zipfile', 'test_zlib', ] regrtest.main(tests) regards, finn |
|
From: Frederic L. <f.l...@al...> - 2001-01-25 13:55:21
|
Pradeep Panda wrote:
>
> I am trying to install Jython-2.0, but it is showning this error
>
> Exception in thread "main"
> java.lang.NoClassDefFoundError: /tmp/jython-20
>
> I am trying to install on HP-UX11.0 OS ) and java1.2
> What shall I do
Make sure that the path where your Jython-20.class is stored is in
the classpath. You must set the CLASSPATH environment variable or
use the -cp option when running the java program
if the Jython-20.class is in the /tmp directory
setenv CLASSPATH ${CLASSPATH}:/tmp (syntax with the tcsh shell)
java Jython-20
or
java -cp ${CLASSPATH}:/tmp Jython-20
And in all cases, take a look at
http://www.jython.org/install.html
Regards
Fred
--
Frédéric Laurent
http://flrt.free.fr
|
|
From: Samuele P. <pe...@in...> - 2001-01-25 13:49:31
|
Hi. The python 2.1 features (quoted from its NEWS): - Two changes to from...import: 1) "from M import X" now works even if M is not a real module; it's basically a getattr() operation with AttributeError exceptions changed into ImportError. 2) "from M import *" now looks for M.__all__ to decide which names to import; if M.__all__ doesn't exist, it uses M.__dict__.keys() but filters out names starting with '_' as before. Whether or not __all__ exists, there's no restriction on the type of M. are already there in jython. I will check if there is a regression test for that in any case, in order to check for "details". PS: in jython there is a more general old jpython bug related to __all__ (for packages too), I will fix it as soon as possible. |
|
From: <bc...@wo...> - 2001-01-25 12:48:48
|
We got this bug report:
>Details: jython-2.0, Sun JDK-1.3, Linux
>
>The os.stat differs between cpython and jython. One can expect, that not
>all values is available in jython, but the time fields is 1000 times larger
>in jython that in cpython which makes the time library fail when operating
>on the values.
>
>Here is an example in jython and cpython for comarrison:
>
>Jython:
>>>> import os
>>>> os.stat('jakarte-test')
>(0, 0, 0, 0, 0, 0, 15761L, 980410501000L, 980410501000L, 0)
>
>Python:
>>>> import os
>>>> os.stat('jakarte-test')
>(33204, 1217412, 3, 1, 2115, 1000, 15761, 980410501, 980410501,
>980410501)
>
>
>Also, the size is a long, while Python return an int.
>
>For detailed info, follow this link:
>http://sourceforge.net/bugs/?func=detailbug&bug_id=130021&group_id=12867
The values from os.stat() is really poorly documented
http://www.python.org/doc/lib/os-file-dir.html#l2h-968
, but I agree that the returning values which is different from cpython
is unfortunate. But what to do?
I'm sure most unix users feel fine with a simple "int(mtime / 1000)"
hack, because the file time resolution is a second on (all?) unices. On
WinNT this would be an actual loss of information since WinNT have
millisecond file time resolution.
How about returning "mtime / 1000.0" as a float number. This is already
the case for CPython on macs. If any libraries fail to handle a float it
is surely a bug in the library.
Comments?
regards,
finn
|
|
From: Pradeep P. <pa...@dh...> - 2001-01-25 09:06:25
|
SSBhbSB0cnlpbmcgdG8gaW5zdGFsbCBKeXRob24tMi4wLCBidXQgaXQgaXMgc2hvd25pbmcg dGhpcyBlcnJvcg0KDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgIEV4Y2VwdGlvbiBp biB0aHJlYWQgIm1haW4iDQpqYXZhLmxhbmcuTm9DbGFzc0RlZkZvdW5kRXJyb3I6IC90bXAv anl0aG9uLTIwDQoNCkkgYW0gdHJ5aW5nIHRvIGluc3RhbGwgb24gSFAtVVgxMS4wIE9TICkg IGFuZCAgIGphdmExLjINCiAgICAgICAgV2hhdCBzaGFsbCBJIGRvDQoNClJlZ2FyZHMNCg== |
|
From: M.Wenzel <we...@gm...> - 2001-01-25 06:35:00
|
Thanks for your help, Frode. I used JTA (http://www.mud.de/se/jta/) already in other Java applications for SSH connections. It works fine in Jython, too. regards, Markus ----- Original Message ----- From: "Frode Reinsnes" <fro...@er...> To: "Markus Wenzel" <We...@gm...>; <jyt...@li...> Sent: Wednesday, January 24, 2001 9:17 AM Subject: Re: [Jython-dev] Telnet library for Jython was [(no subject)] > > Hello, > > > > where can I find module select. > > It's not in [My-Jython2.0-Dir]/Lib. > > I got an import error if I try to > > import this module. > > (I.E. it's used by module telnetlib). > > I have no problem with other Libs. > > > > thank you in advance, > > regards > > Markus > > Hi, > > I have grab the telnet lib from "The Java Telnet Applet" and make some small > modification so it be more as a library for Jython. > > Her is a example who I use it: > > >from telnet import TelnetWrapper > > telnet = TelnetWrapper("123.45.78.90") > telnet.login("loginname", "password") > result = telnet.sendLine("ls") > print result > telnet.disconnect() > > If somebody want this library send me a mail and will send it. > |
|
From: M.Wenzel <we...@gm...> - 2001-01-25 06:25:20
|
Hi Ype, thanks for your detailed answer showing the background of the problem. Meanwhile I helped myself using the Java Telnet Application (JTA) within Jython: http://www.mud.de/se/jta/ You can use JTA for Telnet connections and SSH (with Cryptix), too. Highly recommandable! best regards, Markus ----- Original Message ----- From: "Ype Kingma" <yk...@xs...> To: "Markus Wenzel" <We...@gm...>; <jyt...@li...> Sent: Tuesday, January 23, 2001 8:58 PM Subject: Re: [Jython-dev] (no subject) > >Hello, > > > >where can I find module select. > >It's not in [My-Jython2.0-Dir]/Lib. > >I got an import error if I try to > >import this module. > >(I.E. it's used by module telnetlib). > >I have no problem with other Libs. > > A few days ago I checked briefly on the sockets that > Java makes available and this is what I found: > > The 'native' Java lib does not provide a select function, > so Jython cannot make use of it. The sockets that are there > only a allow to check whether sockets are ready for reading, > ie. you can get to the inputstream of a socket and ask > for the nr. of bytes it has available. However you can't > ask the socket's outputstream for the nr. of bytes it hasn't > written yet, you can only flush the outputstream. > Also there is no out of band data in Java, and for > exceptional things (like TCP/IP errors) happening to an > inputstream, you would have to catch the corresponding > exception from the socket first. > Read timeouts are there, and so is the TCP no delay option, > as well as a shutdown and lingering on close. Non blocking > reads can be done by using a very short time out. > You can't do non blocking writes IIRC. > > I still hope I didn't look close enough, though. > > > Regards, > Ype > |
|
From: Anne W. <an...@un...> - 2001-01-24 23:13:13
|
Hello jython developers,
I am a devoted fan of python. Six to nine months ago I looked into
JPython but was disappointed to find that it did not support the tkinter
module. Is this because tkinter relies on tcl and tk?
What kind of GUI tools does jython provide? Anything based on swing?
Are there any plans along these lines for the future?
Thanks!
Anne
--
***************************************************
Anne Wilson UCAR Unidata Program
an...@un... P.O. Box 3000
Boulder, CO 80307
----------------------------------------------------
Unidata WWW server http://www.unidata.ucar.edu/
****************************************************
|
|
From: brian z. <bz...@zi...> - 2001-01-24 22:51:19
|
As some might be aware, CPython is getting ready to release version 2.1 with a number of new features: http://www.amk.ca/python/2.1/ I was wondering if anyone has started adding these to Jython? If not I'd like to offer assistance in getting Jython up to speed. thanks, brian |
|
From: Brian Z. <bz...@ig...> - 2001-01-24 21:33:30
|
Remove the 'w' from 'javaw.exe'. On Windows, javaw swallows stdout and stderr. Not sure why the installer choose javaw, might have been the only thing it could find at the time. =20 brian -----Original Message----- From: jyt...@li... [mailto:jyt...@li...]On Behalf Of Mike McKenna Sent: Wednesday, January 24, 2001 12:33 PM To: jyt...@li... Cc: =C1lvaro Falquina Subject: [Jython-dev] I'm confused ... Here's the jython.bat file created by the installer. suffice it to say that it doesn't do what I expected. =20 @echo off rem This file generated by Jython installer rem Created on XXX by mike rem rem set JAVA_HOME=3DC:\PROGRAM FILES\JAVA\JRE =20 =20 =20 "C:\PROGRAM FILES\JAVA\JRE\bin\javaw.exe" "-Dpython.home=3DC:\downloads\jython\2-0" -classpath "C:\downloads\jython\2-0\jython.jar;%CLASSPATH%" org.python.util.jython %1 %2 %3 %4 %5 %6 %7 %8 %9 Running in a persistent DOS window I see/hear the disk hits/light blinks and I get nothing. If I enter the command: java I get java if I enter javaw or javaw -jar jython.jar, I get nothing. =20 I tried changing the org.python (see above) to org.jython but to no avail. Ditto for a about an hours worth of fiddling with env variables, paths etc. =20 I have other Java apps, including jpython, running so I'm at a loss for how to get this going. Any pointers on this and other details for installing and running under Win98SE will be appreciated. =20 Thanks =20 Mike =20 p.s. to Alvaro ... go to www.jython.org <http://www.jython.org> fordownload. |