From: <pj...@us...> - 2008-08-03 02:13:39
|
Revision: 5057 http://jython.svn.sourceforge.net/jython/?rev=5057&view=rev Author: pjenvey Date: 2008-08-03 02:13:36 +0000 (Sun, 03 Aug 2008) Log Message: ----------- o pre and xreadlines were removed in CPython 2.4 o include some other modules I hope actually work Modified Paths: -------------- branches/asm/CPythonLib.includes branches/asm/Lib/test/regrtest.py branches/asm/src/org/python/modules/Setup.java Removed Paths: ------------- branches/asm/src/org/python/modules/xreadlines.java Modified: branches/asm/CPythonLib.includes =================================================================== --- branches/asm/CPythonLib.includes 2008-08-02 21:43:22 UTC (rev 5056) +++ branches/asm/CPythonLib.includes 2008-08-03 02:13:36 UTC (rev 5057) @@ -47,6 +47,7 @@ dircache.py dircmp.py dis.py +DocXMLRPCServer.py dospath.py dumbdbm.py exceptions.py @@ -117,6 +118,7 @@ repr.py rfc822.py rlcompleter.py +robotparser.py runpy.py sched.py sha.py @@ -137,6 +139,7 @@ string.py StringIO.py symbol.py +tabnanny.py this.py threading.py textwrap.py Modified: branches/asm/Lib/test/regrtest.py =================================================================== --- branches/asm/Lib/test/regrtest.py 2008-08-02 21:43:22 UTC (rev 5056) +++ branches/asm/Lib/test/regrtest.py 2008-08-03 02:13:36 UTC (rev 5057) @@ -1432,7 +1432,6 @@ test_pyexpat test_resource test_rgbimg - test_robotparser test_rotor test_scriptpackages test_signal Modified: branches/asm/src/org/python/modules/Setup.java =================================================================== --- branches/asm/src/org/python/modules/Setup.java 2008-08-02 21:43:22 UTC (rev 5056) +++ branches/asm/src/org/python/modules/Setup.java 2008-08-03 02:13:36 UTC (rev 5057) @@ -31,7 +31,6 @@ "operator", "time:org.python.modules.time.Time", "_py_compile", - "pre:org.python.modules.re", "_sre", "synchronize", "cPickle", @@ -45,7 +44,6 @@ "_jython", "_new:org.python.modules._newmodule", "_weakref:org.python.modules._weakref.WeakrefModule", - "xreadlines", "errno", "array:org.python.modules.ArrayModule", "_random:org.python.modules.random.RandomModule", Deleted: branches/asm/src/org/python/modules/xreadlines.java =================================================================== --- branches/asm/src/org/python/modules/xreadlines.java 2008-08-02 21:43:22 UTC (rev 5056) +++ branches/asm/src/org/python/modules/xreadlines.java 2008-08-03 02:13:36 UTC (rev 5057) @@ -1,59 +0,0 @@ -// Copyright (c) 2001 Finn Bock. - -package org.python.modules; - -import org.python.core.*; - -public class xreadlines { - private final static int CHUNKSIZE = 8192; - - public static PyString __doc__xreadlines = new PyString( - "xreadlines(f)\n" + - "\n" + - "Return an xreadlines object for the file f." - ); - - public static PyObject xreadlines$(PyObject file) { - return new XReadlineObj(file); - } - - public static class XReadlineObj extends PyObject { - private PyObject file; - private PyObject lines = null; - private int lineslen = 0; - private int lineno = 0; - private int abslineno = 0; - - public XReadlineObj(PyObject file) { - this.file = file; - } - - public PyObject __iter__() { - return new PySequenceIter(this); - } - - public PyObject __finditem__(PyObject idx) { - return __finditem__(((PyInteger)idx.__int__()).getValue()); - } - - public PyObject __finditem__(int idx) { - if (idx != abslineno) { - throw Py.RuntimeError( - "xreadlines object accessed out of order"); - } - - if (lineno >= lineslen) { - lines = file.invoke("readlines", Py.newInteger(CHUNKSIZE)); - lineno = 0; - lineslen = lines.__len__(); - } - abslineno++; - return lines.__finditem__(lineno++); - } - - public String toString() { - return "<xreadlines object " + Py.idstr(this) + ">"; - } - - } -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |