From frederic.gobry@epfl.ch Mon Oct 2 16:39:35 2000 From: frederic.gobry@epfl.ch (=?iso-8859-1?Q?Fr=E9d=E9ric?= Gobry) Date: 2 Oct 2000 17:39:35 +0200 Subject: pybliographer 1.0.5 Message-ID: Hi, =20 I've released pybliographer-1.0.5, available from: http://www.gnome.org/pybliographer/download.html =20 Pybliographer is a tool for handling bibliographic databases. It provides an homogeneous interface over several bibliographic formats (BibTeX, Refer, Ovid, Medline), and powerful search capabilities. It can interact with LyX. CHANGES: * new translations and updated italian documentation * saving of searched words * formatting now respects the order in the index window * display of key/type in the index window =20 =20 REQUIREMENTS: =20 * a working gnome 1.0.x environment * gnome-python >=3D 1.0.53 * python 1.5.2 or 1.6 Fr=E9d=E9ric From brk@jenkon.com Mon Oct 2 22:07:46 2000 From: brk@jenkon.com (Bryn Keller) Date: Mon, 02 Oct 2000 21:07:46 GMT Subject: functional.py - functional programming in Python Message-ID: functional.py provides support for a functional style of Python programming. It includes support for closures, curried functions, lazy expressions, lazy tuples (functional programming languages call these lazy lists, but since lists are mutable in Python, tuples are closer in meaning), and lazy equivalents for map, filter, reduce, and zip. Also some higher-order functions for composing functions and such. functional.py is released under the GNU LGPL, and is available on SourceForge at: http://sourceforge.net/projects/xoltar-toolkit/ I have tried to provide a wide range of the tools that a more functional style of Python programming might need, if there are any glaring oversights, please let me know. Bryn Keller xoltar@starship.python.net From gward@python.net Tue Oct 3 05:08:45 2000 From: gward@python.net (Greg Ward) Date: Tue, 3 Oct 2000 00:08:45 -0400 Subject: ANNOUNCE: Distutils 1.0 Message-ID: Python Distribution Utilities release 1.0 October 2, 2000 The Python Distribution Utilities, or Distutils for short, are a collection of modules that aid in the development, distribution, and installation of Python modules. (It is intended that ultimately the Distutils will grow up into a system for distributing and installing whole Python applications, but for now their scope is limited to module distributions.) The Distutils are a standard part of Python 1.6 and 2.0; if you are running 1.6 or 2.0, you don't need to install the Distutils separately. (However, you might want to upgrade if you're running Python 1.6.) This release is primarily so that you can add the Distutils to a Python 1.5.2 installation -- you will then be able to install modules that require the Distutils, or use the Distutils to distribute your own modules. Distutils 1.0 is the version that will be released with Python 2.0 (unless last-minute bugs pop up). More information is available at the Distutils web page: http://www.python.org/sigs/distutils-sig/ and in the README.txt included in the Distutils source distribution. You can download the Distutils from http://www.python.org/sigs/distutils-sig/download.html Trivial patches can be sent to me (Greg Ward) at gward@python.net. Larger patches should be discussed on the Distutils mailing list: distutils-sig@python.org. Greg -- Greg Ward gward@python.net http://starship.python.net/~gward/ And now for something completely different. From Prabhu Ramachandran Tue Oct 3 14:55:46 2000 From: Prabhu Ramachandran (Prabhu Ramachandran) Date: Tue, 3 Oct 2000 19:25:46 +0530 (IST) Subject: Announce: Graphical visualization tools for python and VTK. Message-ID: hi, I have developed a visualization application that uses python, Tkinter and VTK (http://www.visualizationtoolkit.org) to visualize scientific data. The package is called VTK-CFD. Though it is called a CFD visualizer it can also be used for non CFD data. VTK-CFD is distributed under the GPL. I have also developed a VTK pipeline browser, using Tkinter. It is included in the VTK-CFD distribution but is also available as a standalone package. The pipeline browser is distributed under the LGPL. Please visit the following urls for details: http://www.aero.iitm.ernet.in/~prabhu/software/vtk/vtk-cfd/ http://www.aero.iitm.ernet.in/~prabhu/software/vtk/vtkPipeline/ thanks, prabhu +---------------------------------------------------------------+ | Prabhu Ramachandran http://www.aero.iitm.ernet.in/~prabhu | +---------------------------------------------------------------+ From akuchlin@mems-exchange.org Wed Oct 4 02:52:03 2000 From: akuchlin@mems-exchange.org (A.M. Kuchling) Date: Tue, 3 Oct 2000 21:52:03 -0400 Subject: Python-dev summary: Sept. 16-30 Message-ID: Python-dev summary, September 16-30, 2000 ========================================= This two-week period continued to be slow, with only 395K of postings during this span. This is down from 1.5Mb of messages in July and August, which were busy and contentious months. Because the CVS tree is in a code freeze right now, waiting for the 2.0final release, no one can make large changes, and therefore there are no large changes to spur discussion, just bug fixes, about which usually little can be said. Releases ======== 2.0beta2 was released on September 27: http://www.pythonlabs.com/products/python2.0/ List of changes from 2.0b1 to b2: http://www.pythonlabs.com/products/python2.0/news.html The current plan is to issue a release candidate around October 10th. If no problems show up after around a week, this release would become Python 2.0final. So try out beta2, or at least be sure to try the 2.0rc release when it becomes available. Unicode ======= Barry Scott pointed out that the standard library doesn't support Unicode, in general. He ran into a problem with smtplib.py, which would hang if passed a Unicode string. "I found that I had a lot of unicode floating around from win32com that I was passing into wxPython. It checks for string and raises exceptions. More use of encode() and we are up and running. Is this what you expected when you added unicode?" http://www.python.org/pipermail/python-dev/2000-September/016126.html The ultimate cause is that Unicode strings implement the buffer interface, a C-level API letting callers gain access to the internal representation of a string. The buffer interface is used by PyArg_ParseTuple()'s "s#" format sequence, which is used by the .send() method of socket objects, so the net effect is that sock.send(unicodestr) writes the 2-byte representation of the string to the socket: http://www.python.org/pipermail/python-dev/2000-September/016144.html Other matters ============= M.-A. Lemburg wondered if there were any Python parsers which would find multiple errors: "Would it be possible to write a Python syntax checker that doesn't stop processing at the first error it finds but instead tries to continue as far as possible (much like make -k)?" http://www.python.org/pipermail/python-dev/2000-September/016165.html This led to a subthread on compiler generators. Greg Ward talked about ANTLR: "Unlike pgen, ANTLR is LL(k) -- it can support arbitrary lookahead, although k>2 can make parser generation expensive (not parsing itself, just turning your grammar into code), as well as make your language harder to understand. (I have a theory that pgen's k=1 limitation has been a brick wall in the way of making Python's syntax more complex, i.e. it's a *feature*!)" http://www.python.org/pipermail/python-dev/2000-September/016210.html Greg Ward posted the release plans for the Distutils. Distutils 1.0 was released on October 2, and Greg will be on vacation from Oct. 4 through 12th. The Python 2.0 release is planned for October 10th, of course. http://www.python.org/pipermail/python-dev/2000-September/016286.html Distutils 1.0 announcement: http://www.python.org/pipermail/python-dev/2000-October/016412.html Guido suggested adding an .expand() method to the MatchObject class provided by the re module, and /F quickly responded by checking in the change: http://www.python.org/pipermail/python-dev/2000-September/016163.html /F also committed the long-awaited patch to reduce the huge size of the Unicode character database, from over a megabyte down to around 150K. Related Links ============= Temporary archive of python-dev summaries: http://starship.python.net/crew/amk/python/dev/ Python-dev archives: http://www.python.org/pipermail/python-dev/ Python project page on SourceForge: http://sourceforge.net/projects/python Python Enhancement Proposals (PEPs) summarize recent and past proposals for enhancements: http://python.sourceforge.net/peps/ The python-dev summaries are intended to inform the larger Python community of currently ongoing development. To comment on material in this python-dev summary, simply post to comp.lang.python or . Give your posting a meaningful subject line, and if it's about a PEP, include the PEP number (e.g. Subject: PEP 201 - Lockstep iteration). All python-dev members are interested in seeing ideas discussed by the community, so don't hesitate to take a stance on a PEP if you can share an informed opinion. From kare@speech.kth.se Wed Oct 4 19:12:22 2000 From: kare@speech.kth.se (Kare Sjolander) Date: Wed, 04 Oct 2000 20:12:22 +0200 Subject: ANNOUNCE: Windows installer for Snack v2.0.1 available Message-ID: A self-extracting installer for the Snack Sound Toolkit v2.0.1 and Python 1.6 - 2.0b2 for Windows is now available at http://www.speech.kth.se/snack/ Regards Kare From Jerome.Alet@unice.fr Wed Oct 4 14:55:31 2000 From: Jerome.Alet@unice.fr (Jerome Alet) Date: Wed, 04 Oct 2000 15:55:31 +0200 Subject: Announce: ScanErrLog 1.5 Message-ID: Hi, I'm please to announce ScanErrLog version 1.5. This Python module allows people to parse Apache error_log files from one of different possible sources (filename, stdin, python file object), and present their datas in decreasing number of occurences of error messages. This is particularly useful if you want to quickly solve the most annoying problems web surfers encounter visiting your site. CHANGES: ======== - Sample reports are not distributed anymore, because you can now test it online at: http://cortex.unice.fr/~jerome/scanerrlog/TRY-ME.html - Now requires the jaxml Python module, you have to download it separately. - The jahtml Python module is not distributed anymore with scanerrlog, you have to download it separately. - Now uses Distutils as the installation method, see README for details. WHERE TO GET IT: ================ Download it from: http://cortex.unice.fr/~jerome/scanerrlog/ Feedback (ideas, bug reports, patches, not from France wine, etc...) is very welcome. Thank you for reading. -- Jerome ALET - alet@unice.fr - http://cortex.unice.fr/~jerome From loewis@informatik.hu-berlin.de Sun Oct 8 15:46:38 2000 From: loewis@informatik.hu-berlin.de (Martin von Loewis) Date: 08 Oct 2000 16:46:38 +0200 Subject: PyXML 0.6.1 is released Message-ID: Version 0.6.1 of the Python/XML distribution is now available. It should be considered a beta release, and can be downloaded from the following URLs: http://download.sourceforge.net/pyxml/PyXML-0.6.1.tar.gz http://download.sourceforge.net/pyxml/PyXML-0.6.1.win32-py1.5.exe http://download.sourceforge.net/pyxml/PyXML-0.6.1.win32-py2.0.exe http://download.sourceforge.net/pyxml/PyXML-0.6.1-1.5.2.i386.rpm http://download.sourceforge.net/pyxml/PyXML-0.6.1-2.0b2.i386.rpm Changes in this version, compared to 0.6.0: * Support for Python 1.5.2 was restored, as long as no character set recoding is required * The 4DOM package was updated. * Most of the test suite now passes again. * The tutorial was updated. Changes of version 0.6.0, compared to 0.5.x: * The 4DOM package has been integrated into PyXML. * The package supports now SAX2 interfaces in addition to the SAX1 interfaces. Currently, pyexpat and xmlproc can serve as SAX2 drivers. * The proprietary Unicode type has been removed. Instead, PyXML now relies on the standard Python Unicode type. In turn, PyXML 0.6.0 will not work with Python 1.5. It has been tested with 2.0b1. * PyXML now operates on top of the XML package coming in Python 2. The Python/XML distribution contains the basic tools required for processing XML data using the Python programming language, assembled into one easy-to-install package. The distribution includes parsers and standard interfaces such as SAX and DOM, along with various other useful modules. The package currently contains: * XML parsers: Pyexpat (Jack Jansen), xmlproc (Lars Marius Garshol), xmllib.py (Sjoerd Mullender) using the sgmlop.c accelerator module (Fredrik Lundh). * SAX interface (Lars Marius Garshol) * DOM interface (Stefane Fermigier, A.M. Kuchling) * 4DOM interface from Fourthought (Uche Ogbuji, Mike Olson) * xmlarch.py, for architectural forms processing (Geir Ove Grønmo) * Various utility modules and functions (various people) * Documentation and example programs (various people) The code is being developed bazaar-style by contributors from the Python XML Special Interest Group, so please send comments, questions, or bug reports to . For more information about Python and XML, see: http://www.python.org/topics/xml/ -- Martin v. Löwis http://www.informatik.hu-berlin.de/~loewis From dalke@acm.org Mon Oct 9 13:19:17 2000 From: dalke@acm.org (Andrew Dalke) Date: Mon, 9 Oct 2000 06:19:17 -0600 Subject: Martel-0.3 - a regexp engine generating SAX events Message-ID: Martel-0.3 is now available from http://www.biopython.org/~dalke/Martel/ Martel is a scanner generator for regular languages which uses SAX events to send the parse tree information back to the caller. It's goal is to provide a transition from many existing flat and semi-structured file formats (especially those needed for biopython :) and XML. More details can be found from a recent conference poster available at http://www.biopython.org/~dalke/Martel/BOSC2000.poster/ . Implementation details: o the format description can be a combination of a regular expression strings and Python functions/object: - strings are parsed with a modified version of /F's sre_parse - Python functions are based on Greg Ewing's Plex o the regular expression is turned into an tag table for Marc Andre Lemburg's mxTextTools, which does the actual parsing. o the parser acts like a SAX parser and the resultant tag list is turned into SAX events for the registered handlers. This is the last version of Martel for Python 1.5.2. Changes from 0.2 to 0.3: - Added documentation on the internals and on how to write a parser. - Renamed and moved Generate.StateTable to Parser.Parser - Renamed the various "ContentHandler" to "DocumentHandler." ContentHandler was flat out the wrong method name for SAX. - The parser and exceptions now inherit from the xml.sax.saxlib classes. - To parse a string, use the "parseString" method. The old "parse" method now takes a system identifier string. A system identifier is the SAX way of saying URL. (Note: this will change again with Python 2.0 and the InputSource class.) - The "generate_*" commands now manipulate lists directly instead of passing around 'Parser' objects. - Added parsers which can read a record at a time (ParseRecord and the RecordReader classes.) - Added the optimize module, which does some limited regexp expression cleanups and optimizations. Haven't tested the performance differences yet. - Consistent naming schemes to distinguish between a regexp written as a string (a "pattern"), a parse tree (an "expression") or an mxTextTools table (a "tagtable"). - The "Subpattern" Node was renamed to "Group" for naming consistency with Plex. "Any" was renamed "Dot". "In" was renamed "Any. - Fixed several bugs when translating from an expression tree back to a pattern string. - Added docstrings and comments. - Added type check for the external Plex-like functions, since I was getting annoyed that the error for doing 'Opt("text")' instead of 'Opt(Str("text"))' occured during tagtable generation and was hard to track down. - Moved self test code from the modules into the test/ directory. - Changed the regression code to raise an Assertion error when there was a problem rather than just printing the error and continueing. Andrew Dalke dalke@acm.org From dubois@users.sourceforge.net Mon Oct 9 20:50:33 2000 From: dubois@users.sourceforge.net (Paul F. Dubois) Date: Mon, 09 Oct 2000 19:50:33 GMT Subject: [ANNOUNCE] Ninth International Python Conference Message-ID: CALL FOR PAPERS, POSTERS, AND PARTICIPATION Ninth International Python Conference March 5-8, 2001 Long Beach, California Web site: http://python9.org The 9th International Python Conference (Python 9) is a forum for Python users, software developers, and researchers to present current work, discuss future plans for the language and commercial applications, and learn about interesting uses of Python. The conference will consist of a day of tutorials, two days of refereed paper and application tracks including a Zope track and a multi-technology Python Applications Track, a developers' day, a small exhibition, demonstrations, and posters. Paper submission deadline: Monday, November 6, 2000 Notification of acceptance: Monday, December 11, 2000 Final papers due: Monday, January 15, 2001 Authors are invited to submit papers for the Refereed Paper Track that: * Present new and useful applications and tools that utilize Python * Describe the use of Python in large, mission-critical or unusual applications * Address practical programming problems, and provide lessons based on experience for Python programmers Also sought are poster presentations of interesting work in progress. Full information is available on the website, http://python9.org From Fiona Czuczman Mon Oct 9 10:59:52 2000 From: Fiona Czuczman (Fiona Czuczman) Date: 9 Oct 2000 09:59:52 -0000 Subject: [FAQTS] Python Knowledge Base Update -- October 9th, 2000 Message-ID: Hi All, It's been a while. Sorry, I've taken a full time job which doesn't give me much time to play with the knowledge base .. This post is simply what's happened since my last post. regards, Fiona Czuczman Unanswered Questions : - How do I change the name of a process (as viewed by 'ps') from Python? - How can I get my _full_ program name (eg. "mylongpythonscript.py") under eg. NT? sys.argv[0] gives me the truncated MS-DOS style, "MYLONG~1.PY" etc. - What are the criteria I should consider when deciding between Numeric Python, Matlab or Octave? - getting full program name via sys.argv[0] on (eg.) NT? - is there code that sends the contents of a directory as a multi-part mime message to e-mail recipients? Answered Questions : - Alternative to os.path.walk - How do I find reference count errors? - Python's big, is there a crisp overview? a quick reference card? a bare bones documentation? - Of what use is 'lambda'? - How do I handle command line args with gnome? ## Unanswered Questions ######################################## ------------------------------------------------------------- How do I change the name of a process (as viewed by 'ps') from Python? http://www.faqts.com/knowledge-base/view.phtml/aid/6149 ------------------------------------------------------------- Adam Feuer ------------------------------------------------------------- How can I get my _full_ program name (eg. "mylongpythonscript.py") under eg. NT? sys.argv[0] gives me the truncated MS-DOS style, "MYLONG~1.PY" etc. http://www.faqts.com/knowledge-base/view.phtml/aid/6159 ------------------------------------------------------------- Jon Nicoll ------------------------------------------------------------- What are the criteria I should consider when deciding between Numeric Python, Matlab or Octave? http://www.faqts.com/knowledge-base/view.phtml/aid/5990 ------------------------------------------------------------- Louis Luang ------------------------------------------------------------- getting full program name via sys.argv[0] on (eg.) NT? http://www.faqts.com/knowledge-base/view.phtml/aid/6158 ------------------------------------------------------------- Jon Nicoll ------------------------------------------------------------- is there code that sends the contents of a directory as a multi-part mime message to e-mail recipients? http://www.faqts.com/knowledge-base/view.phtml/aid/5977 ------------------------------------------------------------- Wolfgang Lipp ## New Entries ################################################# ------------------------------------------------------------- Alternative to os.path.walk http://www.faqts.com/knowledge-base/view.phtml/aid/6000 ------------------------------------------------------------- Daniel Dittmar If you have trouble specifying the correct callback to os.path.walk and would prefer to use an iterator as in for fname in RecursiveFileIterator ('dir1', 'dir2'): process (fname) class RecursiveFileIterator: def __init__ (self, *rootDirs): self.dirQueue = list (rootDirs) self.includeDirs = None self.fileQueue = [] def __getitem__ (self, index): while len (self.fileQueue) == 0: self.nextDir () result = self.fileQueue [0] del self.fileQueue [0] return result def nextDir (self): dir = self.dirQueue [0] # fails with IndexError, which is fine # for iterator interface del self.dirQueue [0] list = os.listdir (dir) join = os.path.join isdir = os.path.isdir for basename in list: fullPath = join (dir, basename) if isdir (fullPath): self.dirQueue.append (fullPath) if self.includeDirs: self.fileQueue.append (fullPath) else: self.fileQueue.append (fullPath) ------------------------------------------------------------- How do I find reference count errors? http://www.faqts.com/knowledge-base/view.phtml/aid/6006 ------------------------------------------------------------- Joseph VanAndel Will Ware (Will Ware posted this on comp.lang.python) Numerous postings to c.l.python, including some of my own, have mentioned the difficulty of debugging memory leaks in C extensions. To old hands this stuff may all be obvious, but we less experienced folk need all the help we can get. This is a helpful trick I've developed using the 1.5.2 codebase. I imagine it would work with the 1.6 and 2.0 codebases as well. The typical problem with memory leaks is mismanagement of reference counts, particularly abuses of Py_INCREF and Py_DECREF, as well as ignorance of the refcount effects of functions like Py_BuildValue, PyArg_ParseTuple, PyTuple/List_SetItem/GetItem, and so forth. The existing codebase offers some help with this (search for Py_TRACE_REFS) but I found it useful to add this function in Objects/object.c, just before _Py_PrintReferences. void _Py_CountReferences(fp) FILE *fp; { int n; PyObject *op; for (n = 0, op = refchain._ob_next; op != &refchain; op = op->_ob_next, /*n++*/ n += op->ob_refcnt); fprintf(fp, "%d refs\n", n); } The difference between this and _Py_PrintReferences is that the latter prints out all objects and their refcounts, in a list that runs many pages. It's obviously impractical to do that at several points in a program that runs in a long loop. But this function will only print the total of all the refcounts in the system, which will allow you to keep track of when you have inadvertently put in something that increases the total refcount every time going thru a loop. In my C extension, I put in the following macros. #if defined(Py_DEBUG) || defined(DEBUG) extern void _Py_CountReferences(FILE*); #define CURIOUS(x) { fprintf(stderr, __FILE__ ":%d ", __LINE__); x; } #else #define CURIOUS(x) #endif #define MARKER() CURIOUS(fprintf(stderr, "\n")) #define DESCRIBE(x) CURIOUS(fprintf(stderr, " " #x "=%d\n", x)) #define DESCRIBE_HEX(x) CURIOUS(fprintf(stderr, " " #x "=%08x\n", x)) #define COUNTREFS() CURIOUS(_Py_CountReferences(stderr)) To debug, I rebuild Python using 'make OPT="-DPy_DEBUG"', which causes the stuff under Py_TRACE_REFS to be built. My own makefile uses the same trick, by including these lines: debug: make clean; make OPT="-g -DPy_DEBUG" all CFLAGS = $(OPT) -fpic -O2 -I/usr/local/include -I/usr/include/python1.5 When I suspect that one of my functions is responsible for a memory leak, I liberally sprinkle it with calls to the COUNTREFS() macro. This allows me to keep track of exactly how many references are being created or destroyed as I go through my function. This is particularly useful in loops where simple mistakes can cause reference counts to grow ridiculously fast. Also, reference counts that shrink too fast (overzealous use of Py_DECREF) can cause core dumps because the memory for objects that should still exist has been reallocated for new objects. ------------------------------------------------------------- Python's big, is there a crisp overview? a quick reference card? a bare bones documentation? http://www.faqts.com/knowledge-base/view.phtml/aid/5976 ------------------------------------------------------------- Wolfgang Lipp, Fiona Czuczman Richard Gruet, rgruet@ina.fr; Chris Hoffmann, choffman@vicorp.com; Ken Manheimer, ken.manheimer@nist.gov; Guido van Rossum, guido@CNRI.Reston.Va.US, guido@python.org; Tim Peters, tim_one@email.msn.com; and the readers of comp.lang.python yes, there is. all of it in one html page, have a look @ http://starship.python.net/quick-ref1_52.html ------------------------------------------------------------- Of what use is 'lambda'? http://www.faqts.com/knowledge-base/view.phtml/aid/6081 ------------------------------------------------------------- Joseph VanAndel Kragen Sitaker - it is useful to bind arguments, e.g. lambda x, y=zz: do_something(x,y) --- which can be passed as a function in place of do_something. - why would you want to make an indirect function call in the first place? The answer to the second is deep. Of course, you don't ever *need* to make an indirect function call; in procedural programming, you can write code like this: if fcode == 1: do_thing_one(x, y) elif fcode == 2: do_thing_two(x, y) else: complain(fcode) And when you add a new fcode value, you just have to go to every if-elif-elif-else switch and add a new branch. This is kind of bad, in that it scatters information about what fcode==2 means all over the place, and it's likely that it would be handier to have it all in one place. (There's a balance, of course. Sometimes what fcode==2 means has more to do with the code the if-elif thing is in the middle of than with the other branches that also happen when fcode==2.) With object-oriented programming, you can do something like this instead: fcodething.do_something(x, y) and rely on dynamic method dispatch to do the right thing. This has the advantage that you can put all the do_something and do_something_else methods together. With functional programming, instead, you say: fcode(x, y) and just use indirect function invocation to do the right thing. Closures (like lambda x, y, z=foo: do_something(x, y, z)) make it possible to store state in an invocable function, which means that functions (closures, lambdas) become equivalent to objects. There are times when functional code --- passing around lambdas --- is clearer, and there are arguably times when object-oriented code is clearer. Functional code seems to me more likely to be more flexible, but that's kind of a fuzzy statement and could be nonsense. Closures are sort of equivalent to objects with a single method. If you want to do multiple methods, you have to use some parameter to decide which one to invoke. This makes it hard to go from a "single-method" function to a "multiple-method" function --- you have to change every call to it. You can do prototype-based "inheritance" by delegation --- call some "prototype" function if you don't understand the requested method. Here's an example, albeit a specious one, since Python has stacks built in: def stack(op, arg, data, prototype): if op == 'push': data.append(arg) elif op == 'tos': return data[len(data) - 1] elif op == 'pop': data.pop() else: return prototype(op, arg) def make_stack(prototype=lambda op, arg: None): return (lambda op, arg=None, data=[], prototype=prototype: stack(op, arg, data, prototype)) >>> x = make_stack() >>> x('push', 3) >>> x('tos') 3 >>> x('push', 4) >>> x('tos') 4 >>> x('pop') >>> x('tos') 3 >>> x('pop') >>> x('tos') Traceback (innermost last): File "", line 1, in ? File "", line 2, in File "", line 5, in stack IndexError: list index out of range >>> x('unknown') >>> def hello(): ... print "hello, world" ... >>> x = make_stack(lambda op, arg: hello()) >>> x('push', 37) >>> x('tos') 37 >>> x('unknown arg') hello, world Just as you can create a lambda that acts like an object, you can create an object that emulates a lambda, simply by creating an object with only one method. Both are kind of awkward. (It gets a lot worse when you start trying to do multiple inheritance with lambdas, closures with objects, etc.) (Also, even without closures, function pointers allow you to simulate objects in languages that really have only structs: C, JavaScript, and Lua come to mind, and of these, JavaScript and Lua have syntactic sugar to make it easier. In C, you have to say things like obj->method(obj, arg).) So both approaches are equally powerful; but both of them are more convenient for expressing certain kinds of algorithms. Lambdas seem to be especially convenient for expressing non-mutative stateless algorithms: map, filter, zip. Objects seem to be especially convenient for writing things with lots of state that can be peacefully extended later on. Lambdas make it possible to have really private attributes, even in libertine[0] languages like Perl, JavaScript, and Python. Well, maybe not in Python --- I don't know it well enough yet, but I wouldn't be surprised if there were a way to get at default argument values ;) In Perl (and, I think, JavaScript), you can use closures to have really private methods, too. This has the unfortunate disadvantage that if the methods are potentially recursive, the closures will have circular references and screw up the reference-counting garbage collection, so you have to deallocate things by hand or leak memory. Sometimes it's clearer to write a function in-line in a lambda, even when you're not binding any data into a closure. "sort" is the usual example; you could define an interface (or protocol) "comparator" consisting of a method "compare" which compared two objects in some user-defined way, and then specify your sort routine to require an object implementing "comparator" which compares objects. This has the disadvantage that the order you want the data in is specified in a different class from the one that wants it sorted, which often means that it's actually in a different file --- by convention or by language requirement. Defining a comparator function is often much easier --- you can usually put it in the same file. But, in many languages, you still have to put it outside of the routine that wants the sorting done --- which means that it's ten, twenty, forty lines away from the sort call. Being able to write the function in-line in a lambda keeps related things together and unrelated things apart, which makes your code easier to read, easier to write, easier to find bugs in, and easier to improve. ------------------------------------------------------------- How do I handle command line args with gnome? http://www.faqts.com/knowledge-base/view.phtml/aid/6117 ------------------------------------------------------------- Joseph VanAndel frederic.gedin@free.fr You need to remove from sys.argv the options you processed before invoking the command line option parser from gnome. E.g: import sys,getopt usageStr =\ """-i input_dir [-o output_dir] -r [-- gnome_args] -r specifies real_time mode (default is batch processing) """ # we have to parse arguments before importing gnome.ui, which also wants # to parse arguments. if __name__ == "__main__": global optlist try: optlist, args = getopt.getopt(sys.argv[1:], 'i:o:r') except: detail = sys.exc_info() print detail[0], detail[1] print __doc__ print 'usage : %s %s' % (sys.argv[0], usageStr) sys.exit(-1) # pass remaining arguments to gnome.ui sys.argv = list((sys.argv[0],)) for a in args: sys.argv.append(a) from gnome.ui import * from gtk import * from gnome.config import * # Applications arguments can now be processed from 'optlist'. From Jeremy Hylton Tue Oct 10 07:53:17 2000 From: Jeremy Hylton (Jeremy Hylton) Date: Mon, 9 Oct 2000 23:53:17 -0700 (PDT) Subject: Python 2.0 release candidate 1 Message-ID: Python 2.0c1 is released. The BeOpen PythonLabs and our cast of SourceForge volunteers have fixed many bugs since the beta releases last month. Please pick up the new release at http://www.pythonlabs.com/products/python2.0/ There's a tarball, a Windows installer, RedHat RPMs, online documentation, and a long list of fixed bugs. The final release of Python 2.0 will be next week. We would appreciate feedback on the release candidate in order to fix any remaining bugs before the final release. Confirmation of build and test success on less common platforms is also helpful.n All major reported bugs have been fixed in the release candidate. We do not plan to make any changes between now and the final release, except to fix bugs reported in the next week. We encourage potential users of Python 2.0 to try the release candidate with their programs and report any remaining bugs. To report a new bug, use the SourceForge bug tracker http://sourceforge.net/bugs/?func=addbug&group_id=5470 Python 2.0 has many new features, including the following: - Augmented assignment, e.g. x += 1 - List comprehensions, e.g. [x**2 for x in range(10)] - Extended import statement, e.g. import Module as Name - Extended print statement, e.g. print >> file, "Hello" - Collection of cyclical garbage For a fuller discussion of the changes in Python 2.0, please see the article "What's New in Python 2.0" by Andrew Kuchling and Moshe Zadke: http://starship.python.net/crew/amk/python/writing/new-python/ -- Jeremy Hylton From tismer@appliedbiometrics.com Tue Oct 10 11:33:36 2000 From: tismer@appliedbiometrics.com (Christian Tismer) Date: Tue, 10 Oct 2000 13:33:36 +0300 Subject: Stackless Python 1.2 + Continuations 0.9 Message-ID: ANNOUNCING: Stackless Python 1.2 A Python Implementation That Does Not Use The C Stack * plus the real toy * Continuation Module 0.9 Continuations as First Class Objects with support for MicroThreads What is it? A plugin-replacement for core Python. It should run any program which runs under Python 1.5.2 . But it does not need space on the C stack. For further info, see the new site at http://www.stackless.com You might also want to join the mailing list at http://starship.python.net/mailman/listinfo/stackless Major changes in this release: Extra reference counting reduces continuation frame creation Better exception handling avoids cycles. Next to come: - A port to Python 2.0 will be the first thing to do. - Long-term project is a complete redesign and rewrite for inclusion with Python 2.1 ciao - Christian Tismer / Mission Impossible 5oftware Team

Stackless Python 1.2 + Continuations 0.9 - a version of Python 1.5.2 that does not need space on the C stack, first-class callable continuation objects for Python, and Microthread-support. (10-Oct-2000)

-- http://www.python.org/mailman/listinfo/python-list From just@letterror.com Tue Oct 10 16:47:00 2000 From: just@letterror.com (Just van Rossum) Date: Tue, 10 Oct 2000 16:47:00 +0100 Subject: [Stackless] Stackless Python 1.2 + Continuations 0.9 In-Reply-To: <39E2F080.86ED1DA3@appliedbiometrics.com> Message-ID: In response to the new release of Stackless Python (see http://www.stackless.com/), here's a new stackless binary for MacPython 1.5.2: http://starship.python.net/~just/MacStacklessPython.sit.hqx (The archive contains a replacement for the PythonCore shared library) Just From phd@mail2.phd.pp.ru Tue Oct 10 11:07:51 2000 From: phd@mail2.phd.pp.ru (Oleg Broytmann) Date: Tue, 10 Oct 2000 10:07:51 +0000 (GMT) Subject: Bookmarks Database and Internet robot Message-ID: Hello! Bookmarks Database and Internet Robot WHAT IS IT Here is a set of classes, libraries, programs and plugins I use to manipulate my bookmarks.html. I like Netscape Navigator, but I need more features, so I write and maintain these programs for my needs. I need to extend Navigator's "What's new" feature (Navigator 4 named it "Update bookmarks"). WHAT'S NEW in version 3.0 Complete rewrite from scratch. Created mechanism for pluggable storage managers, writers (DB dumpers/exporters) and robots. WHAT'S NEW in version 3.2.0 New simple_tos robot, based on timeoutsocket.py. New writer fald_err that dumps only errors from the database. WHERE TO GET Master site: http://phd.pp.ru/Software/Python/#bookmarks_db Faster mirrors: http://skyscraper.fortunecity.com/unix/797/Software/Python/#bookmarks_db http://members.nbci.com/_XMCM/phd2.1/Software/Python/index.html#bookmarks_db AUTHOR Oleg Broytmann COPYRIGHT Copyright (C) 1997-2000 PhiloSoft Design LICENSE GPL STATUS Storage managers: pickle, FLAD (Flat ASCII Database). Writers: HTML, text, FLAD (full database or only errors). Robots (URL checker): simple, simple+timeoutscoket, forking. TODO Documentation. New storage managers: shelve, SQL, MetaKit. Robots (URL checkers): threading, asyncore-based. Aliases in bookmarks.html. Configuration file for configuring defaults - global defaults for the system and local defaults for subsystems. Detailed reports on robot run - what's old, what's new, what was moved, errors, etc. WWW-interface to the report. Bigger database. Multiuser database. Robot should operate on a part of the DB. WWW-interface to the database. User will import/export/edit bookmarks, schedule robot run, etc. Oleg. ---- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. From mail@jbrisbin.net Tue Oct 10 22:47:48 2000 From: mail@jbrisbin.net (Jon Brisbin) Date: Tue, 10 Oct 2000 16:47:48 -0500 Subject: Python ServerPages 0.7.0a on sourceforge Message-ID: The Python ServerPages distribution on sourceforge has been updated with the latest release. This software is still considered alpha, or pre-beta :-) You can get it at http://sourceforge.net/projects/pythonpages It is also mirrored at (with more documentation) at: http://www.jbrisbin.net/PythonServerPages What is this PSP implementation? Python ServerPages is an OpenSource project that seeks to give developers wishing to embed Python into their HTML pages a consistent and stable parse engine, which would increase their productivity, while including small, simple services to reduce repetitive tasks that every developer faces. The changes to version 0.7.0a include: * Major bug fixes :-) * Added html_quote(stuff) function * Added include(file="file.html") function * Added a proc_total_time to gauge the speed of parsing and executing the page * Added a view_source() function to aid in debugging * Altered the parsing routine to allow nested parsing This version of PSP is easier to use (sample code:) [- include(file="header.psp") first_name = Form.name -] [+Form.name+] [$ def do_something(self, param): $]
[+param+]
[$ enddef $] [$ if Form.name == "harry": $] [- do_something("Harry") -] is logged in. [$ endif $] [- include(file="page2.psp") -] [- include(file="footer.html") -] Some documentation is also available at http://www.jbrisbin.net/PythonServerPages Enjoy! Jon Brisbin www.jbrisbin.net +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Email: mail@jbrisbin.net PSP Home: www.jbrisbin.net/PythonServerPages Public PGP key: www.jbrisbin.net/pgpkey.shtml +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ From brk@jenkon.com Thu Oct 12 17:29:35 2000 From: brk@jenkon.com (Bryn Keller) Date: Thu, 12 Oct 2000 16:29:35 GMT Subject: threadpool.py 0.8 Message-ID: I'm pleased to announce the release of threadpool.py, released under the GNU LGPL. Threadpool.py can be obtained from: http://sourceforge.net/projects/xoltar-toolkit/ and requires the functional.py module available from the same page, or you can download the combined toolkit. This module uses the threading and Queue modules to create a pool of reusable threads. Version 0.8 is a major rewrite of the version previously available from my Python Starship page. It now supports a much cleaner interface, thanks to functional.py. After creating an instance of ThreadPool, one queues functions to be executed. The pool dispatches the functions to the waiting threads, which call them. When queuing a function on the pool with *pool*.put(), an instance of ReturnValue is returned. ReturnValue is a subclass of functional.Lazy, and can be used in any context that a regular lazy expression can. When evaluating a ReturnValue, the evaluating thread will block until the other thread has completed its work and loaded the return value of the function into the ReturnValue instance. VLocks are an alternative to RLocks which include a visible queue threads waiting for the lock. lock, unlock, getLockFor, and deleteLockFor work with a module level dictionary of objects to locks, and can be more convenient than working with lock objects directly. Locked and Async are callable wrappers around a function. Async calls return immediately after queuing their function on a thread pool, while Locked calls first acquire the lock they were passed on creation, call their function, and release the lock. -- Bryn Keller xoltar@starship.python.net From brk@jenkon.com Thu Oct 12 17:28:57 2000 From: brk@jenkon.com (Bryn Keller) Date: Thu, 12 Oct 2000 16:28:57 GMT Subject: functional.py 0.6 - Functional Programming in Python Message-ID: I'm pleased to announce the release of functional.py version 0.6, released under the GNU LGPL. functional.py can be obtained from: http://sourceforge.net/projects/xoltar-toolkit/ functional.py provides support for a functional style of Python programming. It includes support for closures, curried functions, lazy expressions, lazy tuples (functional programming languages call these lazy lists, but since lists are mutable in Python, tuples are closer in meaning), and lazy equivalents for map, filter, reduce, and zip. Also some higher order functions for composing functions and such. This release fixes a problem that prevented zero length LazyTuples (thanks to Alex Martelli for catching this one). It also adds several new functions or functors: class sequential: """ Take a number of functions, and when called, call each of them in turn. The first function in the list is the "main", or significant function, and the others are taken for side effects only. Their return values do not affect the return value of the also function, and any errors they raise are silently disregarded. If a function is explicitly specified via the *main* parameter, that function will be the one whose return value is used, regardless of where in the sequence it appears. Example: >>> def one(): ... print "one" ... return 1 ... >>> def two(): ... print "two" ... return 2 ... >>> def three(): ... print "three" ... return 3 ... >>> x = one() one >>> x 1 >>> x = sequential([one, two, three])() one two three >>> x 1 >>> >>> x = sequential([one, two, three], main = three)() one two three >>> x 3 >>> """ def also(*args): """ Handles the common case for **sequential**, in which the first function passed is the significant one. It takes free arguments instead of a single sequence argument. Example: >>> def one(): ... print "one" ... return 1 ... >>> def two(): ... print "two" ... return 2 ... >>> def three(): ... print "three" ... return 3 ... >>> one() one 1 >>> x = one() one >>> x 1 >>> x = also(one, two, three)() one two three >>> x 1 >>> x = also(two, one, three)() two one three """ class always: """ Returns a callable which always returns a given object. Example: >>> f = always(5) >>> f() 5 >>> """ class any_args: """ Returns a callable which will take any arguments, and ignore them, calling *func* with no arguments. Useful with map(), or in the common case of GUI event handlers which need to accept an event parameter, but do not use it. Example: >>> def return5(): ... return 5 ... >>> return5("unneeded", "unnecessary") Traceback (innermost last): File "", line 1, in ? TypeError: no arguments expected >>> f = any_args(return5) >>> f("unneeded", "unnecessary") 5 >>> """ class with_error: """ Takes a function, and an error-handler function. When called, the first function will be called. Any errors will cause the error function to be called with sys.exc_info() as the argument, *and the return value of the error handler will be returned.* If the error-handler function re-raises the exception (or another), the exception will propagate back to the caller. It is possible to chain error-handlers together with **atempt**, below. Example: >>> from operator import div >>> div(1/0) Traceback (innermost last): File "", line 1, in ? ZeroDivisionError: integer division or modulo >>> def recover(exc): ... return sys.maxint ... >>> safediv = with_error(div, recover) >>> safediv(1, 0) 2147483647 >>> """ class attempt: """ Given a function sequence, attempt to call and return each in turn. The return value of the first function to successfully return is returned. This could be used to implement something like the pattern matching techniques used in functional languages. A common use would be attaching error handlers to functions after the fact. Suppose we want a want a version of the div() function that returns sys.maxint when we attempt to divide by zero, and zero if we attempt to divide by something other than a number as in this example: >>> def zeroHandler(exc_info): ... exc = exc_info[1] ... if isinstance(exc, ZeroDivisionError): ... return sys.maxint ... else: ... raise ... >>> safediv = with_error(div, zeroHandler) >>> safediv(1, 0) 2147483647 >>> def typeHandler(exc_info): ... exc = exc_info[1] ... if isinstance(exc, TypeError): ... return 0 ... else: ... raise ... >>> safediv = with_error(div, attempt(zeroHandler, typeHandler)) >>> safediv(1,0) 2147483647 >>> safediv(1, "abc") 0 >>> """ -- Bryn Keller xoltar@starship.python.net From irmen@-nospam-bigfoot.com Thu Oct 12 19:51:19 2000 From: irmen@-nospam-bigfoot.com (Irmen de Jong) Date: Thu, 12 Oct 2000 20:51:19 +0200 Subject: ANN: AmigaPython 1.6 Message-ID: I'm happy to announce: AmigaPython 1.6 - build 1 The Amiga version of Python. WHAT IT IS: This is the Python interpreter (version 1.6) for AmigaDOS. WHAT'S NEW ? - New version 1.6! Based on main Python 1.6 final source code. - First fully Unicode aware application on AmigaDOS! (as far as I know) WHERE CAN I GET IT ? From Aminet , in the dev/lang directory: Python16.lha Python language 1.6 (bin+lib) Python16_Src.lha Python language 1.6 (source) Also have a look at my Python pages at . It comes with a Python-style license, but is otherwise free for commercial and non-commercial use. REFERENCE:

AmigaPython 1.6 - AmigaDOS port of Python 1.6 (12-Oct-2000) ---- Irmen de Jong irmen@ bigfoot.com From uche.ogbuji@fourthought.com Sun Oct 15 00:29:41 2000 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Sat, 14 Oct 2000 17:29:41 -0600 Subject: ANN: 4Suite 0.9.1 Message-ID: Fourthought, Inc. (http://Fourthought.com) announces the release of 4Suite 0.9.1 --------------------------- Open source tools for standards-based XML, DOM, XPath, XSLT, RDF XPointer and object-database development in Python 4Suite is a collection of Python tools for XML processing and object database management. An integrated packaging of several formerly separately-distributed components: 4DOM, 4XPath and 4XSLT, 4RDF, 4ODS and featuring the new 4XPointer. News ---- * Introduced 4XPointer: A parser for xpointer expressions * 4XPath: optimized parse tree, now minimizes itself as it is created. * 4XPath: self-validating test suite * 4XSLT and 4XPath: better support for the namespace axis * 4XSLT and 4XPath: optimized context management * 4XSLT implemented cdata-section-elements * 4DOM (HTML): Much improved test suite (actually works, somewhat) * 4DOM: improved error handling * 4RDF: Implement RDF Schemas * 4RDF: RIL bug fixes * 4RDF: API clean-up, improve URI handling * 4RDF: driver bug fixes * 4RDF: improved error handling * 4RDF: Serialization/deserialization bug-fixes * 4ODS: IMprovements and fixes to DOMWrapper * 4DOM and XSLT output fixes * 4ODS Fixed bugs in OqlParsers * 4ODS Fixed bugs in Oif dump and load * Improved exceptions and bug-fixes in cDomlette * Packaging fixes * Added and improved test suites * Many misc optimizations * Many misc bug-fixes More info and Obtaining 4Suite ------------------------------ Please see http://Fourthought.com/4Suite Or you can download 4Suite source from ftp://Fourthought.com/pub/4Suite There are Windows Packages, Linux RPM and Linux binary also available at ftp://Fourthought.com/pub/4Suite 4Suite is distributed under a license similar to that of Python. -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA Software-engineering, knowledge-management, XML, CORBA, Linux, Python From uche.ogbuji@fourthought.com Sun Oct 15 00:37:03 2000 From: uche.ogbuji@fourthought.com (Uche Ogbuji) Date: Sat, 14 Oct 2000 17:37:03 -0600 Subject: 4RDF Featured on XML.com Message-ID: 4RDF, available with 4Suite 0.9.1, is the feature article this week on XML.com. Python now has the most fully-featured Resource Description Framework (RDF) library available and the XML.com library discusses the details. http://www.xml.com/pub/2000/10/11/rdf/index.html or until Oct 19, simply http://www.xml.com Knowledge of XML and RDF (which is simple enough) is required. Links to that effect are provided in the article. -- Uche Ogbuji Principal Consultant uche.ogbuji@fourthought.com +1 303 583 9900 x 101 Fourthought, Inc. http://Fourthought.com 4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA Software-engineering, knowledge-management, XML, CORBA, Linux, Python From jsaenz@wm.lc.ehu.es Mon Oct 16 16:45:43 2000 From: jsaenz@wm.lc.ehu.es (Jon Saenz) Date: Mon, 16 Oct 2000 17:45:43 +0200 (MET DST) Subject: ANNOUNCE: PyClimate 1.0 Message-ID: Monday, 10/16/2000 Hello, all. We are making the first announce of the first stable release (1.0) of our package pyclimate, which presents some tools used for climate variability analysis and which make extensive use of Numerical Python and C. It is released under the GNU Public License. Changes from the previous release Version 1.0--October, 2000. 1) Improved tests. They are more accurate, reliable, informative, comprehensive and use less disk space. 2) The package compiles using distutils. This feature has been checked on FreeBSD, Linux and OSF platforms. 3) Some minor typos corrected in the documentation. 4) Added KPDF.c, a extension module to estimate univariate and multivariate kernel--based probability density functions. 5) Added a class to compute the vertical component of the curl of a vectorial field in diffoperators.py. 6) DCDFLIB.C is currently distributed with the package. 7) KZFilter.py has been converted into a general purpose LinearFilter.py which holds the basic operations of any linear filter. There are two different subclasses currently, the Lanczos filter and the previous Kolmogorov--Zurbenko filter, KZFilter.py. The user can define new filters just by redefining the filter coefficients subclassing LinearFilter. The package also contains (from release 0.0): IO functions ------------ -ASCII files (simple, but useful) -ncstruct.py: netCDF structure copier. From a COARDS compliant netCDF file, this module creates a COARDS compliant file, copying the needed attributes, comments, and so on in one call. Time handling routines ---------------------- * JDTime.py -> Some C/Python functions to convert from date to Scaliger's Julian Day and from Julian Day to date. We are not trying to replace mxDate, but addressing a different problem. In particular, this module contains a routine especially suited to handling monthly time steps for climatological use. * JDTimeHandler.py -> Python module which parses the units attribute of the time variable in a COARDS file and which offsets and scales adequately the time values to read/save date fields. Interface to DCDFLIB.C ---------------------- A C/Python interface to the free DCDFLIB.C library is provided. This library allows direct and inverse computations of parameters for several probability distribution functions like Chi^2, normal, binomial, F, noncentral F, and many many more. EOF analysis ------------ Empirical Orthogonal Function analysis based on the SVD decomposition of the data matrix and related functions to test the reliability/degeneracy of eigenvalues (truncation rules). Monte Carlo test of the stability of eigenvectors to temporal subsampling. SVD decomposition ----------------- SVD decomposition of the correlation matrix of two datasets, functions to compute the expansion coefficients, the squared cumulative covariance fraction and the homogeneous and heterogeneous correlation maps. Monte Carlo test of the stability of singular vectors to temporal subsampling. Multivariate digital filter --------------------------- Multivariate digital filter (high and low pass) based on the Kolmogorov-Zurbenko filter Differential operators on the sphere ------------------------------------ Some classes to compute differential operators (gradient and divergence) on a regular latitude/longitude grid. LICENSE ======= GNU General Public License Version 2. PREREQUISITES ============= To be able to use it, you will need: 1. Python ;-) 2. netCDF library 3.4 or later 3. Scientific Python, by Konrad Hinsen IF AND ONLY IF you really want to change the C code (JDTime.[hc] and pycdf.[hc]), then, you will also need SWIG. COMPILATION =========== Now, we use distutils. The installation is simpler. DOCUMENTATION ============= Postscript and PDF versions of the manual are included in the distribution. We are preparing an even better version of the documentation. AVAILABILITY ============ http://lcdx00.wm.lc.ehu.es/~jsaenz/pyclimate (Europe) http://pyclimate.zubi.net/ (USA) http://starship.python.net/crew/~jsaenz (USA) Any feedback from the users of the package will be really appreciated by the authors. Enjoy. Jon Saenz, jsaenz@wm.lc.ehu.es Juan Zubillaga, wmpzuesj@lg.ehu.es Jesus Fernandez, chus@wm.lc.ehu.es

PyClimate 1.0 - Several routines for the analysis of climate variability. (16-Oct-00) From MSteed@altiris.com Mon Oct 16 18:28:54 2000 From: MSteed@altiris.com (Mike Steed) Date: Mon, 16 Oct 2000 11:28:54 -0600 Subject: gdchart-py-0.5 Message-ID: Gdchart-py-0.5 is available. Gdchart-py is a Python interface to Bruce Verderaime's GDChart library, which produces charts and graphs in PNG, JPEG, and GIF format. Changes in version 0.5: - Uses gd-1.8.3 (bug fixes) - Uses gdchart-0.951 (new options and chart styles) - Now builds against Python-1.6 (still builds against 1.5.x). - option() now returns a dict of current settings when called with no args - GIF and JPEG support are selectable at build time - The build is easier and more solid - Minor bug fixes I have tested this version on WinNT 4.0 and Linux/x86. The makefile includes settings for Solaris and HP-UX (untested). If you have trouble on these platforms, or can provide settings for other platforms, please let me know. Documentation, source code, and Win32 binaries are available: http://athani.pair.com/msteed/software/gdchart/ Regards, Mike Steed msteed@fiber.net From guido@python.org Tue Oct 17 04:35:02 2000 From: guido@python.org (Guido van Rossum) Date: Mon, 16 Oct 2000 22:35:02 -0500 Subject: Python 2.0 final release is out! Message-ID: I am happy to announce that Python 2.0 is released. I thank my colleagues at BeOpen PythonLabs and the many volunteers in the Python developer community for their incredible work on this release over the past months. Please pick up the new release at http://www.pythonlabs.com/products/python2.0/ There you will find a Windows installer, a source tarball, RedHat RPMs, downloadable and online documentation, and a long list of new features and fixed bugs. Among the new features in Python 2.0 are: - Augmented assignment, e.g. x += 1 - List comprehensions, e.g. [x**2 for x in range(10)] - Extended import statement, e.g. import Module as Name - Extended print statement, e.g. print >> file, "Hello" - Collection of cyclical garbage For a fuller discussion of the changes in Python 2.0 since Python 1.5.2, please see the article "What's New in Python 2.0" by A.M. Kuchling and Moshe Zadka: http://starship.python.net/crew/amk/python/writing/new-python/ All major reported bugs have been fixed in this final release. We've gone through an extremely thorough set of beta releases followed by a release candidate, and therefore we expect that this release will be stable and virtually problem-free. If you nevertheless run into a bug, use the SourceForge bug tracker to report it: http://sourceforge.net/bugs/?group_id=5470 --Guido van Rossum (home page: http://www.python.org/~guido/) From gobry@users.sourceforge.net Tue Oct 17 15:20:57 2000 From: gobry@users.sourceforge.net (=?iso-8859-1?Q?Fr=E9d=E9ric?= Gobry) Date: 17 Oct 2000 16:20:57 +0200 Subject: ANNOUNCE: pybliographer 1.0.6 Message-ID: Hi, =20 I've just released pybliographer-1.0.6, available from: http://www.gnome.org/pybliographer/download.html =20 Pybliographer is a tool for handling bibliographic databases. It provides an homogeneous interface over several bibliographic formats, and powerful search capabilities. It can interact with LyX. WHAT'S NEW * Works with Python 1.6 & 2.0 * Capability to create alternate key generators * Fixed the Refer -> BibTeX converter for special characters (angs= tr=F6m) REQUIREMENTS = =20 * a working gnome 1.0.x environment for the graphical interface * gnome-python >=3D 1.0.53 * python >=3D 1.5.2 Fr=E9d=E9ric From grante@visi.com Tue Oct 17 12:29:52 2000 From: grante@visi.com (Grant Edwards) Date: 17 Oct 2000 06:29:52 -0500 Subject: Dr. Dobb's Python-URL! - weekly Python news and links (Oct 17) Message-ID: Jeremy Hylton announces Python 2.0c1 -- release candidate 1. http://deja.com/=dnc/getdoc.xp?AN=679664784 Oleg Broytmann's bookmark database and internet robot modules, version 3.0 http://deja.com/=dnc/getdoc.xp?AN=679664820 Robin Becker announces ReportLab 1.01 -- a Python package for generating PDF documents using Python as a scripting language. http://deja.com/=dnc/getdoc.xp?AN=679675365 Pearu Peterson starts PySymbolic project - "Doing Symbolics in Python" http://deja.com/=dnc/getdoc.xp?AN=679810372 Robin Becker adds Unicode support to cCopy 0.2 http://deja.com/=dnc/getdoc.xp?AN=680053128 Edward Muller provides binaries for Python on Compaq iPAQ. http://deja.com/=dnc/getdoc.xp?AN=681552161 ======================================================================== Everything you want is probably one or two clicks away in these pages: Python.org's Python Language Website is the traditional center of Pythonia http://www.python.org although PythonLabs.com bills itself as "The Python Source", which is becoming increasingly true in 2000 http://www.pythonlabs.com/ PythonWare complements the digest you're reading with the daily python url http://www.pythonware.com/daily comp.lang.python.announce announces new Python software. Be sure to scan this newly-revitalized newsgroup at least weekly. http://deja.com/group/comp.lang.python.announce The Vaults of Parnassus ambitiously collects Python resources http://www.vex.net/~x/parnassus/ Much of Python's real work takes place on Special-Interest Group mailing lists http://www.python.org/sigs/ Python Consortium emerges as an independent nexus of activity http://www.python.org/consortium Cetus does much of the same http://www.cetus-links.de/oo_python.html Python FAQTS http://python.faqts.com/ Python To-Do List anticipates some of Python's future direction http://www.python.org/cgi-bin/todo.py Python Journal is at work on its second issue http://www.pythonjournal.com Links2Go is a new semi-automated link collection; it's impressive what AI can generate http://www.links2go.com/search?search=python Archive probing trick of the trade: http://www.dejanews.com/dnquery.xp?QRY=&DBS=2&ST=PS&defaultOp=AND&LNG=ALL&format=threaded&showsort=date&maxhits=100&groups=comp.lang.python Previous - (U)se the (R)esource, (L)uke! - messages are listed here: http://purl.org/thecliff/python/url.html or http://www.dejanews.com/dnquery.xp?QRY=~g%20comp.lang.python%20Python-URL%21 Suggestions/corrections for next week's posting are always welcome. [http://www.egroups.com/list/python-url-leads/ is hibernating. Just e-mail us ideas directly.] To receive a new issue of this posting in e-mail each Monday morning, ask to subscribe. Mention "Python-URL!". -- The Python-URL! Team-- Dr. Dobb's Journal (http://www.ddj.com) is pleased to participate in and sponsor the "Python-URL!" project. -- Cameron Laird Business: http://www.Phaseit.net Personal: http://starbase.neosoft.com/~claird/home.html From lani@lava.net Tue Oct 17 17:29:11 2000 From: lani@lava.net (Baglady Lani) Date: Tue, 17 Oct 2000 06:29:11 -1000 (HST) Subject: meta description of newsgroups? In-Reply-To: <1gmnuskafs43m9t42urgkk2e9lg12s65gf@4ax.com> Message-ID: On Mon, 16 Oct 2000, Sheila King wrote: >Here's one I came across recently, that looks promising: >http://tgos.org/newbie/ Thanks for the heads-up, Sheila. I did notice that they erroneously define Ob as "obviously," whereas in Usenet I've always known it to stand for "obligatory" (i.e. "ObSoc.culture.hawaii: Okay, so I'll admit Hawaii pineapples DO taste better"). I can't find a way to notify them though; the "contact TGOS" link is not a link. Oy. -- \0/ "Packing tips for one-bag trips" | Baglady Lani Teshima, MLIS/tech writer |D The Travelite.FAQ--Get enLITEned | IM/eBay: Traveliter /< at | Home: http://www.lava.net/~lani soc.culture.hawaii co-moderator, Mouseplanet columnist, Black Rock Ranger From pattist@ix.netcom.com Tue Oct 17 18:15:31 2000 From: pattist@ix.netcom.com (barbara pattist) Date: Tue, 17 Oct 2000 12:15:31 -0500 Subject: meta description of newsgroups? In-Reply-To: <39EC7855.2BC50012@sfo.com> References: <72smus8rt36jf7q8jica5fndnpms4hedh3@4ax.com> <1gmnuskafs43m9t42urgkk2e9lg12s65gf@4ax.com> <39EC67A1.2647BD5@sfo.com> <39EC7855.2BC50012@sfo.com> Message-ID: On Tue, 17 Oct 2000 09:03:33 -0700, Brian Mailman wrote: >Russ Allbery wrote: >> >> Brian Mailman writes: >> > Sheila King wrote: >> >> >> Here's one I came across recently, that looks promising: >> >> http://tgos.org/newbie/ >> >> > Before you start pointing people there, please subscribe to alt.config >> > and read all that "The Guardian of Sailor Moon" (tgos) has to say about >> > newsgroup creation. > >> The content in the above pages isn't too bad, though, although I could >> nit-pick some of the technical details. > >No, it isn't, and there's plenty I agree with him about. There's also a >lot of things I don't. It seems the details you'd nitpick some find to >be major--and not being a sysadmin, (I only lurk in nanap) I can't tell >who's right. I believe that listing both categories might be offtopic >for this list and I was attempting to make a neutral statement so that >Sheila King could ascertain for herself the provenance of the advice. > >B/ I've never decided whether TGOS is a kook with spells of rationality or a sane guy who goes crazy on certain topics. In any case he's not in my killfile yet, although I've been sorely tempted of late. :) In a nutshell, he keeps telling proponents they don't need a charter for a newsgroup knowing full well there are users coming to alt.config to say their ISP won't carry a group because there is no charter. His FAQ... ignore justification, traffic measurements, charters.... conflicts with all the other FAQs on group creation. BarB From brk@jenkon.com Wed Oct 18 16:57:25 2000 From: brk@jenkon.com (Bryn Keller) Date: Wed, 18 Oct 2000 15:57:25 GMT Subject: lazy.py 0.7 - Lazy expressions and datastructures Message-ID: I'm pleased to announce the release of lazy.py version 0.7, released under the GNU LGPL. lazy.py can be obtained from: http://sourceforge.net/projects/xoltar-toolkit/ Release Name: 0.7 lazy.py provides support for lazy expressions, lazy tuples (functional programming languages call these lazy lists, but since lists are mutable in Python, tuples are closer in meaning), and lazy equivalents for map, filter, reduce, and zip. New in this release: Lazy has become its own module now, since functional was growing somewhat large. Changes: 10/18/2000 - Version 0.7: Removed from functional.py to become separate module. -- Bryn Keller xoltar@starship.python.net From ljohnson@resgen.com Wed Oct 18 17:43:39 2000 From: ljohnson@resgen.com (Lyle Johnson) Date: Wed, 18 Oct 2000 11:43:39 -0500 Subject: ANNOUNCE: FXPy-0.99.135 (Python Bindings for FOX) Message-ID: This is an update of FXPy, a Python extension module which provides an interface to the FOX cross-platform GUI library: Home Page: http://home.hiwaay.net/~johnson2/FXPy Download Source: ftp://ftp.cfdrc.com/pub/FOX/FXPy-0.99.135.tar.gz Windows Binaries: ftp://ftp.cfdrc.com/pub/FOX/FXPy-0.99.135-win32.exe To build FXPy from the sources, you will also need to download version 0.99.135 of the FOX library: FOX Home Page: http://www.cfdrc.com/FOX/fox.html Download Source: ftp://ftp.cfdrc.com/pub/FOX/fox-0.99.135.tar.gz ftp://ftp.cfdrc.com/pub/FOX/fox-0.99.135.zip As you may have guessed by now, the latest release of FXPy is version 0.99.135. What is it? ----------- FXPy is a Python extension module which provides an interface to the FOX cross-platform GUI library. With a few minor exceptions, FXPy provides a complete interface to FOX. FOX is a C++-based toolkit for developing graphical user interfaces easily and effectively. Some of the significant features of FOX include: * A rich set of widgets (including dials, shutters, tree lists, and many other "modern" widgets). * Powerful but easy-to-use layout managers. * Extensive support for 3-D modeling using OpenGL or Mesa. * Supports the XDND protocol for drag-and-drop. * Registry for persistent application settings. * Runs natively under Unix/X and Microsoft Windows. * And much, much more! Please see the FOX home page (URL listed above) for more details about the FOX library's features. Also consider subscribing to the foxgui-users mailing list for the latest news about FOX development; again, see the FOX home page for information on this. FXPy is (c) 1999, 2000 Lyle Johnson (ljohnson@resgen.com) and is released under the GNU Lesser General Public License.

FXPy-0.99.135 - interface to the FOX cross-platform GUI library. (18-Oct-00) From brk@jenkon.com Wed Oct 18 16:57:19 2000 From: brk@jenkon.com (Bryn Keller) Date: Wed, 18 Oct 2000 15:57:19 GMT Subject: functional.py 0.7 - Functional programming in Python Message-ID: I'm pleased to announce the release of functional.py version 0.7, released under the GNU LGPL. functional.py can be obtained from: http://sourceforge.net/projects/xoltar-toolkit/ Release Name: 0.7 functional.py provides support for a functional style of Python programming. It includes support for closures, curried functions, many higher-order functions for composing, joining or otherwise manipulating functions and other callables. New in this release: All the functors (callable classes) now descend from Functor, a class which provides facilities for masquerading as a function. This allows things like curries and disjoins to be passed to code which expects to be able to inspect it for things like the names of its arguments, default values, etc. These functors all provide a SimCode instance as their func_code attribute, which has most of the information that a real code object would have, which helps complete the illusion. This release fixes bugs which affected the curry and rcurry functors. As a result, curry and rcurry will now work with any callable, not only functions and methods. This includes *classes* as well, so you can now pass a class as the first argument to curry, and when the curried function is called, the return value will be a new instance of the class. The Lazy and LazyTuple classes, along with related items, have been removed to their own module, lazy.py. Changes: 10/18/2000 - Version 0.7: Fix for bug in getMinimumArgCount which returned misleading results for callables. Allow classes as first argument to curry and rcurry. All functors now Functor subclasses. Removed lazy functionality to lazy.py 10/12/2000 - Version 0.6: Fix for LazyTuples of length zero (thanks to Alex Martelli) Added new functions/functors: sequential also any_args always with_error attempt 10/1/2000 - Initial release 0.5 -- Bryn Keller xoltar@starship.python.net From brk@jenkon.com Wed Oct 18 16:57:21 2000 From: brk@jenkon.com (Bryn Keller) Date: Wed, 18 Oct 2000 15:57:21 GMT Subject: threadpool.py 0.9 - Thread control utilities Message-ID: I'm pleased to announce the release of threadpool.py version 0.9, released under the GNU LGPL. threadpool.py can be obtained from: http://sourceforge.net/projects/xoltar-toolkit/ Release Name: 0.9 Notes: This module uses the threading and Queue modules to create a pool of reusable threads. After creating an instance of ThreadPool, one queues functions to be excecuted. The pool dispatches the functions to the waiting threads, which call them. When queueing a function on the pool with *pool*.put(), an instance of ReturnValue is returned. ReturnValue is a subclass of functional.Lazy, and can be used in any context that a regular lazy expression can. When evaluating a ReturnValue, the evaluating thread will block until the other thread has completed its work and loaded the return value of the function into the ReturnValue instance. VLocks are an alternative to RLocks which include a visible queue threads waiting for the lock. lock, unlock, getLockFor, and deleteLockFor work with a module-level dictionary of objects to locks, and can be more convenient than working with lock objects directly. Locked and Async are callable wrappers around a function. Async calls return immediately after queueing their function on a thread pool, while Locked calls first acquire the lock they were passed on creation, call their function, and release the lock. Changes: 10/18/2000: Release 0.9 Fixed endless loop bug when an exception was raised. 10/12/2000: Move to SourceForge, release 0.8 -- Bryn Keller xoltar@starship.python.net From barry@wooz.org Thu Oct 19 14:39:30 2000 From: barry@wooz.org (Barry A. Warsaw) Date: Thu, 19 Oct 2000 09:39:30 -0400 (EDT) Subject: Announcing Jython, the sucessor to JPython Message-ID: Hello JPython users, I'm very happy to announce the formation of the Jython project on SourceForge. Jython is the successor to JPython, the Java implementation of the Python programming language. We've created this new project in accordance with the CNRI JPython 1.1.x license, in order to ensure the continued existence and development of this important piece of Python software. The intent is to manage this project with the same open policies that are serving CPython so well. Finn Bock and I have been working on the next release, to be called Jython 2.0. Finn has integrated his JPython errata, and Python 2.0 language features such as augmented assignments, list comprehensions, and extended print have also been added. The free Apache Jakarta OROMatcher software has taken the place of the previously non-free OROMatcher code for regular expressions, so there will be no further need to dual license. Jython 2.0 will eventually be released with a license similar to CPython 2.0. I don't know when the first alpha release of Jython 2.0 will happen, but all the code is currently available in the SourceForge CVS tree. I will also be converting the old Jitterbug database to the SF bug tracker as soon as possible. I've created several mailing lists to support Jython development: jython-users@lists.sourceforge.net This list will supplant jpython-interest@python.org and should be the general discussion list for Jython users. jython-dev@lists.sourceforge.net This is an analog to python-dev@python.org, except that it will have an open subscription policy. This is the place for Jython developers to discuss and help move the Jython project further. jython-announce@lists.sourceforge.net A low-traffic, announce only list. jython-checkins@lists.sourceforge.net Similar to python-checkins@python.org, this list will receive CVS checkin and diff messages. All these mailing lists, and all current information on the Jython project is available at SourceForge, at http://sourceforge.net/projects/jython I will not be automatically subscribing any current jpython-interest members to the new lists; that's up to you. I know Finn joins me when I say that we look forward to working with you on Jython, and to your contributions in furthering this project's development. Cheers, -Barry From Gordon Williams" *** Creating Python Extensions Using Borland's Free Compiler V2.0*** I am pleased to announce a set of step-by-step instructions and examples to create extensions using the free Borland Command Line Compiler with the standard Python Windows Binary Distribution. This information can be found at http://www.cyberus.ca/~g_will/pyExtenDL.shtml . Version 3.0 updates the linking library to Python 2.0 and removes an obsolete patch for the Python 1.5.2 config.h file. I have also added a section about using VIDE (http://www.objectcentral.com/), a free and useful IDE for Borland and other compilers. ********************************************************************** ABSTRACT This paper describes the method used to create Python Extensions using the Borland 5.5 C++ Compiler (BCC). This command line compiler is available free from http://www.borland.com/bcppbuilder/freecompiler/. I describe the steps that are necessary to produce the extension from the C source code and how to set up the associated files for the compiler and linker. These extensions work with the standard Windows Distribution of Python. The process used to produce the extension is very easy and consists of running a simple batch file that I provide as part of this package. A section is provided on how to create extensions using VIDE to make it even easier. I also have some examples and a short reference section at the end of this paper that may be helpful. Gordon Williams g_will@cyberus.ca From robin@alldunn.com Fri Oct 27 05:29:45 2000 From: robin@alldunn.com (Robin Dunn) Date: Thu, 26 Oct 2000 21:29:45 -0700 Subject: ANNOUNCE: wxPython 2.2.2 Message-ID: wxPython 2.2.2 has finally been released! You can get your copy at http://wxPython.org/download.php. At that site you'll find the sources, docs, and binaries for Linux and Win32 for both Python 1.5.2 and Python 2.0 Here's an excerpt from the CHANGES.txt file: New in 2.2.2 ------------ Significantly changed how the wxStyledtextCtrl code that wraps Scintilla is implemented. Most of it is now automatically generated from an interface definition file provided by Scintilla. This means that it will be much easier to stay in sync with new Scintilla releases, but also means that some of the method and identifier names have changed. See wxPython/demo/data/stc.h for a copy of the C++ interface from which the Python interface is generated. There is now some inline documentation in that file that should really help explain how things work. I am now using the Python Distutils to build wxPython and to make some of the distribution files. (See http://www.python.org/sigs/distutils-sig/) This means no more messing with my kludgy build.py/Makefile hack, builds will be more consistent with other Python extensions that also use Distutils, and will hopefully make wxPython easier to build for platforms where there have been troubles before. If you are building wxPython for Python 1.5.2 or for 1.6, then you will need to get and install version 1.0 of Distutils from the website above. If you are using Python 2.0 then you already have it. Added wxInputStream and the wxFileSystem family of classes, contributed by Joerg Baumann. Added wxProcess and support for it to wxExecute. wxProcess lets you get notified when an asyncronous child process terminates, and also to get input/output streams for the child process's stdout, stderr and stdin. Removed the old python sizers. Added __add__, __sub__ and __cmp__ (equality check only) for wxPoint and wxRealPoint. Changed the build to make one big extension module instead of one for the core and each contrib. This allowed me to do away with the libwxPyHelpers.so on unix systems. Lots of little fixes here and there. Some hacks on wxGTK to try and make the AutoComplete listbox in the wxStyledTextCtrl to behave better. It's still not as nice as on wxMSW, but at least it's a bit more usable now. -- Robin Dunn Software Craftsman robin@AllDunn.com http://wxPython.org Java give you jitters? http://wxPROs.com Relax with wxPython! From guido@python.org Sat Oct 28 02:42:42 2000 From: guido@python.org (Guido van Rossum) Date: Fri, 27 Oct 2000 20:42:42 -0500 Subject: PythonLabs Team Moves to Digital Creations Message-ID: To all Python users and developers: Less than half a year ago, I moved with my team to BeOpen.com, in the hope of finding a new permanent home for Python development. At BeOpen, we've done several good things for Python, such as moving the Python and Jython development process to SourceForge, and the successful release of Python 2.0. Unfortunately, BeOpen.com's original plans for PythonLabs didn't work out as hoped, and we weren't able to reach mutual agreement on workable alternative plans -- despite trying for months. I am proud to have found a new home for my entire team: starting today, Tim Peters, Barry Warsaw, Jeremy Hylton, Fred Drake and myself are working for Digital Creations. We will be spending part of our time on core Python development (including Jython and Mailman) and part of our time on Python infrastructure improvements that also benefit Zope. Python will remain Open Source; Digital Creations has no desire to monetize or brand the Python language or specific Python distributions. All future work we do on Python as Digital Creations employees will be owned by a non-profit organization yet to be created. We think of this new organization as the Python Software Foundation. In the meantime (while the PSF is under construction) I will own such copyrights personally. We're excited to be working for Digital Creations: they are one of the oldest companies active in the Python community, one of the companies most committed to Python, and they have a great product! Plus, we know they have deep financial backing. We trust that Digital Creations will provide a stable home for Python for many years. Digital Creations has also offered to take over hosting of the python.org and starship sites. On behalf of the Python community, we're grateful for this support of the two prime community sites for Python, and we expect to be implementing the transitions shortly. These are exciting times for the PythonLabs team -- and also for Python and its community. Mainstream successes for Python are showing up everywhere, and we're proud to be a part of such a smart and friendly community. A great year lies ahead! --Guido van Rossum (home page: http://www.python.org/~guido/) From Fiona Czuczman Sun Oct 29 05:24:46 2000 From: Fiona Czuczman (Fiona Czuczman) Date: 29 Oct 2000 05:24:46 -0000 Subject: [FAQTS] Python Knowledge Base Update -- October 29th, 2000 Message-ID: Hi Guys, What's happened in the python knowledge base since last post(9/10). regards, Fiona Czuczman ## Unanswered Questions ######################################## ------------------------------------------------------------- How do I get the UID from os.stat mapped to a real username in NT? http://www.faqts.com/knowledge-base/view.phtml/aid/6374 ------------------------------------------------------------- Lance ------------------------------------------------------------- I'm getting an error stating that "None" object has no attribute "groups" during setup of numpy, any ideas? http://www.faqts.com/knowledge-base/view.phtml/aid/6245 ------------------------------------------------------------- Michael Risser ------------------------------------------------------------- how can i create a pop up window with entry on it, so that i can get the value from the entry and process it with the original frame, thanks http://www.faqts.com/knowledge-base/view.phtml/aid/6347 ------------------------------------------------------------- tony zhang ------------------------------------------------------------- How do you access the printer from Python under Linux??? http://www.faqts.com/knowledge-base/view.phtml/aid/6376 ------------------------------------------------------------- Dave Berry ------------------------------------------------------------- How do I check and retrieve the error conditions & message of script executed via the Python/C API (without using PyErr_Print) http://www.faqts.com/knowledge-base/view.phtml/aid/6234 ------------------------------------------------------------- Kostas Karanikolas ## New Entries ################################################# ------------------------------------------------------------- How can I get my _full_ program name (eg. "mylongpythonscript.py") under eg. NT? sys.argv[0] gives me the truncated MS-DOS style, "MYLONG~1.PY" etc. http://www.faqts.com/knowledge-base/view.phtml/aid/6159 ------------------------------------------------------------- Jon Nicoll, Fiona Czuczman Alex Martelli This seems to work in my setup (2.0b2, Win98): import sys try: raise RuntimeError except: x=sys.exc_info()[2] print x.tb_frame.f_code.co_filename Placing this in alongfilename.py and running python alongfilename.py results in the expected output: alongfilename.py ################################################## # Under (NT4, Python v1.5.2), the above also gives # the 'short' form for me. # This is a bit more Win32 specific, but works for my environment import sys import win32api print win32api.FindFiles(sys.argv[0])[0][8] ## Edited Entries ############################################## ------------------------------------------------------------- Where can I best learn how to parse out both HTML and Javascript tags to extract text from a page? http://www.faqts.com/knowledge-base/view.phtml/aid/3680 ------------------------------------------------------------- Paul Allopenna, Matthew Schinckel, Magnus Lyckå Python Documentation If you want to (quickly) strip all HTML tags from a string of data, try using the re module: import re file = open(filename,'r') data = file.read() file.close() text = re.sub('<.*?>', '', data) #Remove comments first, or '>' in #comments will be interpreted as #end of (comment) tag. text = re.sub('', '', text) This will also strip any javascript, but only if the page has been made 'properly' - that is, the javascript is within HTML comments. If you want to know how it works, read the 're' chapter in the library reference, as it discusses the usefulness of 'non-greedy' regular expressions. ------------------------------------------------------------- How do I change the name of a process (as viewed by 'ps') from Python? http://www.faqts.com/knowledge-base/view.phtml/aid/6149 ------------------------------------------------------------- Adam Feuer, Fiona Czuczman Oleg Broytmann Don't know much about Mac. Probably, there is no such thing as "process name". :) On Windows, it is possible, and I saw a code doing that. Probably, Mark Hammond was the author, if I remember it right. On UNIX it is impossible now. To do this, someone will need to wrap one of "setproctitle" sources. The most known code is "setproctitle" from sendmail, but it accompanied with not-so-free license. More liberal license is for similar code in PostgreSQL, so if anyone is interested to do some work and produce a working module - PostgreSQL is a good place to start. From irmen@-nospam-bigfoot.com Sun Oct 29 12:17:03 2000 From: irmen@-nospam-bigfoot.com (Irmen de Jong) Date: Sun, 29 Oct 2000 13:17:03 +0100 Subject: ANN: AmigaPython 2.0 Message-ID: I'm happy to announce: AmigaPython 2.0 - build 1 The Amiga version of Python. WHAT IT IS: This is the Python language (version 2.0) for AmigaDOS. WHAT'S NEW ? - New version 2.0! Based on main Python 2.0 final source code. - First fully Unicode aware application on AmigaDOS! (as far as I know) - Includes fast XML parser (Expat) WHERE CAN I GET IT ? From Aminet , in the dev/lang directory: Python20.lha Python language 2.0 (bin+lib) Python20_Src.lha Python language 2.0 (source) Also have a look at my Python pages at . It comes with a Python-style license, but is otherwise free for commercial and non-commercial use. REFERENCE:

AmigaPython 2.0 - AmigaDOS port of Python 2.0 (29-Oct-2000) ---- Irmen de Jong irmen@ bigfoot.com From Prabhu Ramachandran Sun Oct 29 18:11:59 2000 From: Prabhu Ramachandran (Prabhu Ramachandran) Date: Sun, 29 Oct 2000 23:41:59 +0530 (IST) Subject: New release of VTK-CFD and vtkPipeline browser. Message-ID: hi, This is to announce new releases of VTK-CFD (version 0.5) and the python VTK pipeline browser (version 0.9). Notable enhancements are PLOT3D structured grid support, postscript save option, a new stream line/ribbon/tube module and a VTK object "pickler". VTK-CFD is written in Python, and uses Tkinter and VTK to visualize scientific data. It is distributed under the GPL. The VTK pipeline browser is included in the VTK-CFD distribution but is also available as a standalone package. The pipeline browser is distributed under the LGPL. Please visit the following for details: http://freshmeat.net/projects/vtk-cfd/ http://freshmeat.net/projects/vtkpipeline/ prabhu From dubois@users.sourceforge.net Tue Oct 31 21:19:29 2000 From: dubois@users.sourceforge.net (Paul F. Dubois) Date: Tue, 31 Oct 2000 21:19:29 GMT Subject: Python 9 Paper Submissions Message-ID: The deadline for submitting a paper to the Python 9 conference is next Monday, November 6. Knowing the work habits of the Python community, I made the deadline a Monday instead of Friday. Instead of partying all weekend as usual, why not write up your work and submit it at: http://python9.org Note that the guidelines on formatting only apply to the final paper; we'll take it in any readable electronic form for now. If you want to do a poster, submit your abstract as a normal paper and just say in it that you only want it considered as a poster. From dubois@users.sourceforge.net Tue Oct 31 23:00:46 2000 From: dubois@users.sourceforge.net (Paul F. Dubois) Date: Tue, 31 Oct 2000 23:00:46 GMT Subject: Windows zip of Numerical Python 17.1.1 available Message-ID: Numerical 17.1.1 is available in both source and prebuilt Windows versions at: http://sourceforge.net/projects/numpy Windows users, simply extract into your top level Python 2.0 directory, typically c:\python20. Thank you to Pete Shinners for putting the Windows file together. It is too late to change for the 17 series but in future I will make releases that have whole numbers only as names and add files to that release as they become available. That makes it a little clearer that you should take the most recent file of the desired type.