Dr. Dobb's Python-URL! - weekly Python news and links (Oct 4)

2006-10-03 Thread Cameron Laird
QOTW: If you want your objects to know their name, give them a name as an attribute. - Georg Brandl Unfortunately forty years of programming experience has taught me that there's an essentially infinite supply of mistakes to make ... your mistakes just get smarter most of the time. - Steve

Need help with syntax on inheritance.

2006-10-03 Thread SpreadTooThin
If you are deriving a new class from another class, that you must (I assume) know the initializer of the other class. So in myClass import array class myClass(arrary.array): def __init__(self, now here I need to put array's constructor parameters..., then mine):

Re: Python to use a non open source bug tracker?

2006-10-03 Thread Steve Holden
Paul Rubin wrote: Istvan Albert [EMAIL PROTECTED] writes: But this will definitely not happen over a short period of time and even in the worst case scenario there will be a few years in which the development can take place in an awesome environment. I've looked at the JIRA demo, and wow, it

RE: CGI - mod_python

2006-10-03 Thread Damjan
I'm confused. is WSGI only a specification, or are there implementations, and if so which ones WSGI is only a specification. There are a lot of implementations: servers, middleware and almost all new Python web apps and frameworks are WSGI applications. Here is a list of WSGI servers

Re: PEP 358 and operations on bytes

2006-10-03 Thread Steve Holden
Ben Finney wrote: Gabriel G [EMAIL PROTECTED] writes: At Tuesday 3/10/2006 21:52, Ben Finney wrote: Gerrit Holl [EMAIL PROTECTED] writes: - str methods endswith, find, partition, replace, split(lines), startswith, - Regular expressions Looking at those, I don't see why they

Re: Strange sorting error message

2006-10-03 Thread Steve Holden
Dustan wrote: I'm hiding some of the details here, because I don't want to say what I'm actually doing. [...] I have the answer to your problem but I don't actually want to tell you what it is. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd

Re: Python to use a non open source bug tracker?

2006-10-03 Thread Ben Finney
Steve Holden [EMAIL PROTECTED] writes: Like others I have my doubts about using commercial products to support open source development I'm all in favour of using commercial products to support Python development. What I'm not in favour of is using non-free products to do so. If we *know* that

Re: PEP 358 and operations on bytes

2006-10-03 Thread Ben Finney
Steve Holden [EMAIL PROTECTED] writes: This would just be bloat How would it be bloat? I'm describing a situation where the existing methods merely move, being implemented in a common ancestor rather than directly in the concrete sequence classes. without any use cases being demonstrated.

Re: Can't get around IndexError: list index out of range

2006-10-03 Thread Terry Reedy
Leif K-Brooks [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm trying to get this bit of code to work without triggering the IndexError. import shutil, os, sys if sys.argv[1] != None: ver = sys.argv[1] else: ver = '2.14' Catch it: try:

Re: PEP 358 and operations on bytes

2006-10-03 Thread John Machin
Gerrit Holl wrote: Hi, In Python 3, reading from a file gives bytes rather than characters. Some operations currently performed on strings also make sense when performed on bytes, either if it's binary data or if it's text of unknown or mixed encoding. Those include of course slicing and

Re: Can't get around IndexError: list index out of range

2006-10-03 Thread John Machin
Terry Reedy wrote bloated code: if sys.argv[1:2] != []: if sys.argv[1:2]: :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: python html rendering

2006-10-03 Thread Pierre Imbaud
hanumizzle wrote: On 10/3/06, Colin J. Williams [EMAIL PROTECTED] wrote: Another approach is to use PyScripter (an editor and IDE). One can generate documentation and then save the generated html doc. Also PyDoc can be used directly. And if you want to go the traditional way, Emacs and

understanding htmllib

2006-10-03 Thread David Bear
I'm trying to understand how to use the HTMLParser in htmllib but I'm not seeing enough examples. I just want to grab the contents of everything enclosed in a 'body' tag, i.e. items from where body begins to where /body ends. I start by doing class HTMLBody(HTMLParser): def __init__(self):

Roundup Issue Tracker release 1.1.3

2006-10-03 Thread Richard Jones
I'm proud to release version 1.1.3 of Roundup. Feature: - supports Python 2.5, including the sqlite3 module - full timezone support (sf patch 1465296) - handle connection loss when responding to web requests - match incoming mail In-Reply-To against existing messages when no issue id is

Re: PEP 358 and operations on bytes

2006-10-03 Thread Steve Holden
Ben Finney wrote: Steve Holden [EMAIL PROTECTED] writes: This would just be bloat How would it be bloat? I'm describing a situation where the existing methods merely move, being implemented in a common ancestor rather than directly in the concrete sequence classes. without any use

Re: python html rendering

2006-10-03 Thread Pierre Imbaud
Colin J. Williams wrote: Josh Bloom wrote: Hey Pierre, I'm using this plug-in for wordpress to display Python code. http://blog.igeek.info/wp-plugins/igsyntax-hiliter/ It works pretty well and can display a lot of other languages as well. -Josh On 10/3/06, *Pierre Imbaud* [EMAIL

Re: Python to use a non open source bug tracker?

2006-10-03 Thread Terry Reedy
Ben Finney [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If we *know* that we can always get all the data out of the product, As I understood B.C.'s announcement, that was one of the judging criteria, and the plan is for PSF to get a daily backup dump of the data. tjr --

A Universe Set

2006-10-03 Thread jordan . nick
Has the addition of a Universe Set object ever been suggested. Like U = set(0), so that any object was a member of U? Maybe this gets into some crazy Cantorian stuff since U is in U. But it seems like it would be useful and would have a nice symmetry with emptyset:set([]), that is: for any

How to get keyboard event in Linux console?

2006-10-03 Thread Jia,Lu
Hi all, I want to deal keyboard event in Linux console. Example: I Create a deamon at background and when I press F1 key then print Hello at Console. Can python do it? with which module? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Can't get around IndexError: list index out of range

2006-10-03 Thread Steve Holden
[EMAIL PROTECTED] wrote: Hi all, I'm sorry about the newbie question, but I've been searching all afternoon and can't find the answer! I'm trying to get this bit of code to work without triggering the IndexError. import shutil, os, sys if sys.argv[1] != None: ver = sys.argv[1]

Re: Roundup Issue Tracker release 1.1.3

2006-10-03 Thread Richard Jones
Richard Jones wrote: I'm proud to release version 1.1.3 of Roundup. That's supposed to say 1.2.0. Sigh. -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help with syntax on inheritance.

2006-10-03 Thread jordan . nick
SpreadTooThin wrote: If you are deriving a new class from another class, that you must (I assume) know the initializer of the other class. So in myClass import array class myClass(arrary.array): def __init__(self, now here I need to put array's constructor parameters..., then mine):

Re: Manipulate PDFs

2006-10-03 Thread Cameron Laird
In article [EMAIL PROTECTED], I misled the newsgroup by writing: . . . On a large, Very Important Zope site I maintain, though, one which delivers thousands of dynamically-generated PDF images (not to be confused with the

Re: A Universe Set

2006-10-03 Thread Robert Kern
[EMAIL PROTECTED] wrote: Has the addition of a Universe Set object ever been suggested. Like U = set(0), so that any object was a member of U? In [61]: class UniverseSet(object): : def __contains__(self, x): : return True : In [62]: U =

Re: A Universe Set

2006-10-03 Thread Steve Holden
[EMAIL PROTECTED] wrote: Has the addition of a Universe Set object ever been suggested. Like U = set(0), so that any object was a member of U? Maybe this gets into some crazy Cantorian stuff since U is in U. But it seems like it would be useful and would have a nice symmetry with

can't open chm files all of a sudden

2006-10-03 Thread John Salerno
Hi all. I apologize since this is only remotely Python related, but I hope someone might now the solution. I tried opening my Python chm docs just now, as well as the one for wxPython, and both are giving me an error dialog when I double-click them and I can't open them. This happened

Re: can't open chm files all of a sudden

2006-10-03 Thread John Salerno
John Salerno wrote: Hi all. I apologize since this is only remotely Python related, but I hope someone might now the solution. I tried opening my Python chm docs just now, as well as the one for wxPython, and both are giving me an error dialog when I double-click them and I can't open

Re: python html rendering

2006-10-03 Thread Mark Peters
Hi, Im looking for a way to display some python code in html: with correct indentation, possibly syntax hiliting, dealing correctly with multi-line comment, and... generating valid html code if the python code itself deals with html (hence manipulates tag litterals. Thanks for your help! I

What kind of program is this

2006-10-03 Thread John Smith
what kind of program is this? I would like to know. import win32api from win32api import * import win32con from win32con import *; from string \ import split aJAPy = 'C:/Program Files/Python/Lib/ \ JAPy.py' if split(aJAPy,'.')[-1] in ('py','pyw'\ ): aJAPy = %s %s %s % ('J' 'A' 'Py'\

ctypes, arrays and pointers

2006-10-03 Thread Richard Jones
Does anyone know how to do the equivalent of this using ctypes? image_data = malloc(width * height * components); row_pointers = png_get_rows(png_ptr, info_ptr); for (y = 0; y height; y++) memcpy(image_data[width * components * y], row_pointers[height-y-1],

Compiling binaries

2006-10-03 Thread Henrique Nakashima
Hi, I'm trying to find a way to compile .py files into linux binaries, so that i can distribute a program without having the user install python itself. Is there a way to do that?I tried pypack but since im new with linux, i couldn't install it from source. There was also py2exe, but this makes

Re: python html rendering

2006-10-03 Thread Fredrik Lundh
Pierre Imbaud wrote: I rather thought of some module built on python parser, generating html or xml, ideally customizable. see colorizer.py and element_colorizer.py in this directory: http://svn.effbot.python-hosting.com/stuff/sandbox/pythondoc /F --

switching to numpy and failing, a user story

2006-10-03 Thread [EMAIL PROTECTED]
After using numeric for almost ten years, I decided to attempt to switch a large codebase (python and C++) to using numpy. Here's are some comments about how that went. - The code to automatically switch python stuff over just kind of works. But it was a 90% solution, I could do the rest by hand.

Re: switching to numpy and failing, a user story

2006-10-03 Thread Robert Kern
[EMAIL PROTECTED] wrote: After using numeric for almost ten years, I decided to attempt to switch a large codebase (python and C++) to using numpy. Here's are some comments about how that went. - The code to automatically switch python stuff over just kind of works. But it was a 90%

[ python-Bugs-1569622 ] Backward incompatibility in logging.py

2006-10-03 Thread SourceForge.net
Bugs item #1569622, was opened at 2006-10-02 23:10 Message generated for change (Comment added) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1569622group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1569356 ] sys.settrace cause curried parms to show up as attributes

2006-10-03 Thread SourceForge.net
Bugs item #1569356, was opened at 2006-10-02 15:26 Message generated for change (Comment added) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1569356group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1569790 ] mailbox.Maildir.get_folder() loses factory information

2006-10-03 Thread SourceForge.net
Bugs item #1569790, was opened at 2006-10-03 10:16 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1569790group_id=5470 Please note that this message will contain a full copy of

[ python-Bugs-1484556 ] Output of KlocWork on Python2.4.3 sources

2006-10-03 Thread SourceForge.net
Bugs item #1484556, was opened at 2006-05-09 13:14 Message generated for change (Comment added) made by tebeka You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1484556group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1521947 ] possible bug in mystrtol.c with recent gcc

2006-10-03 Thread SourceForge.net
Bugs item #1521947, was opened at 2006-07-13 17:39 Message generated for change (Comment added) made by arigo You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1521947group_id=5470 Please note that this message will contain a full copy of the comment thread,

[ python-Bugs-1545668 ] gcc trunk (4.2) exposes a signed integer overflows

2006-10-03 Thread SourceForge.net
Bugs item #1545668, was opened at 2006-08-24 03:14 Message generated for change (Comment added) made by arigo You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1545668group_id=5470 Please note that this message will contain a full copy of the comment thread,

[ python-Bugs-1521947 ] possible bug in mystrtol.c with recent gcc

2006-10-03 Thread SourceForge.net
Bugs item #1521947, was opened at 2006-07-13 13:39 Message generated for change (Comment added) made by tim_one You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1521947group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1569886 ] distutils don't respect standard env variables

2006-10-03 Thread SourceForge.net
Bugs item #1569886, was opened at 2006-10-03 12:59 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1569886group_id=5470 Please note that this message will contain a full copy of

[ python-Bugs-1484556 ] Output of KlocWork on Python2.4.3 sources

2006-10-03 Thread SourceForge.net
Bugs item #1484556, was opened at 2006-05-09 12:14 Message generated for change (Comment added) made by loewis You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1484556group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1568243 ] init_types

2006-10-03 Thread SourceForge.net
Bugs item #1568243, was opened at 2006-09-30 11:34 Message generated for change (Comment added) made by loewis You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1568243group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1569517 ] PGIRelease linkage fails on pgodb80.dll

2006-10-03 Thread SourceForge.net
Bugs item #1569517, was opened at 2006-10-02 21:54 Message generated for change (Comment added) made by loewis You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1569517group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1567910 ] missing _typesmodule.c, Visual Studio 2005 pythoncore.vcproj

2006-10-03 Thread SourceForge.net
Bugs item #1567910, was opened at 2006-09-29 19:47 Message generated for change (Comment added) made by loewis You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1567910group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1569886 ] distutils don't respect standard env variables

2006-10-03 Thread SourceForge.net
Bugs item #1569886, was opened at 2006-10-03 12:59 Message generated for change (Comment added) made by loewis You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1569886group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1569886 ] distutils don't respect standard env variables

2006-10-03 Thread SourceForge.net
Bugs item #1569886, was opened at 2006-10-03 12:59 Message generated for change (Comment added) made by luks You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1569886group_id=5470 Please note that this message will contain a full copy of the comment thread,

[ python-Bugs-1563630 ] IDLE doesn't load - apparently without firewall problems

2006-10-03 Thread SourceForge.net
Bugs item #1563630, was opened at 2006-09-22 17:19 Message generated for change (Comment added) made by daniboy22 You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1563630group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1569998 ] 2.5 incorrectly permits break inside try statement

2006-10-03 Thread SourceForge.net
Bugs item #1569998, was opened at 2006-10-04 00:04 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1569998group_id=5470 Please note that this message will contain a full copy of

[ python-Bugs-1569998 ] 2.5 incorrectly permits break inside try statement

2006-10-03 Thread SourceForge.net
Bugs item #1569998, was opened at 2006-10-04 00:04 Message generated for change (Comment added) made by ncoghlan You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1569998group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1569998 ] 2.5 incorrectly permits break inside try statement

2006-10-03 Thread SourceForge.net
Bugs item #1569998, was opened at 2006-10-03 14:04 Message generated for change (Settings changed) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1569998group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1569622 ] Backward incompatibility in logging.py

2006-10-03 Thread SourceForge.net
Bugs item #1569622, was opened at 2006-10-02 16:10 Message generated for change (Comment added) made by mklaas You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1569622group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1569622 ] Backward incompatibility in logging.py

2006-10-03 Thread SourceForge.net
Bugs item #1569622, was opened at 2006-10-02 23:10 Message generated for change (Comment added) made by vsajip You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1569622group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Feature Requests-1567331 ] logging.RotatingFileHandler has no infinite backupCount

2006-10-03 Thread SourceForge.net
Feature Requests item #1567331, was opened at 2006-09-28 21:36 Message generated for change (Settings changed) made by vsajip You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=355470aid=1567331group_id=5470 Please note that this message will contain a full copy of the

[ python-Bugs-1570255 ] redirected cookies

2006-10-03 Thread SourceForge.net
Bugs item #1570255, was opened at 2006-10-04 09:37 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1570255group_id=5470 Please note that this message will contain a full copy of

[ python-Bugs-1570284 ] Launcher reset to factory button provides bad command-line

2006-10-03 Thread SourceForge.net
Bugs item #1570284, was opened at 2006-10-03 14:17 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1570284group_id=5470 Please note that this message will contain a full copy of

[ python-Bugs-1558223 ] apache2 - mod_python - python2.4 core dump

2006-10-03 Thread SourceForge.net
Bugs item #1558223, was opened at 2006-09-14 00:05 Message generated for change (Comment added) made by thurnerrupert You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1558223group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1558223 ] apache2 - mod_python - python2.4 core dump

2006-10-03 Thread SourceForge.net
Bugs item #1558223, was opened at 2006-09-14 00:05 Message generated for change (Comment added) made by zseil You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1558223group_id=5470 Please note that this message will contain a full copy of the comment thread,

[ python-Bugs-1569057 ] Using .next() on file open in write mode writes junk to file

2006-10-03 Thread SourceForge.net
Bugs item #1569057, was opened at 2006-10-01 23:49 Message generated for change (Comment added) made by rainy You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1569057group_id=5470 Please note that this message will contain a full copy of the comment thread,

Bug in unicode object free list?

2006-10-03 Thread Pasquale d'Aloise
I suspect there is a bug in the way the unicode object free list is managed. In the file unicodeobject.c, I noticed the following statements whose behaviour is a bit ambiguous for me: unicode_freelist = *(PyUnicodeObject **)unicode; . *(PyUnicodeObject **)unicode = unicode_freelist; .. u

Exception during GarbageCollection in Py_Finalize()

2006-10-03 Thread Matthias Uhlig
Hi, I have two problems using the C/API to write a C dll, the first and serious: 1) The Scenario (pLocal, pGlobal are not changed by the dll during one "init- fini" cycle) - Py_Initialize() - PyRun_String("x=1", Py_single_input, pGlobal, pLocal) - PyRun_String("x:=1", Py_eval_input, pGlobal,

sys.settrace closure interaction bug

2006-10-03 Thread Scott Marks
The code below exhibits different behavior depending on whether it invokes sys.settrace ('-t' option) or not. This means that (in a more complicated case) debugging the code (which uses sys.settrace) makes it fail. Any ideas? Demonstrace that tracing messes up curried class definitions # Some

Re: [ python-Bugs-1569998 ] 2.5 incorrectly permits break inside try statement

2006-10-03 Thread Jeremy Hylton
I'm working on this bug now, but can't get an SF login to update the bug report. Jeremy On 10/3/06, SourceForge.net [EMAIL PROTECTED] wrote: Bugs item #1569998, was opened at 2006-10-03 14:04 Message generated for change (Settings changed) made by gbrandl You can respond by visiting:

[ python-Bugs-1569356 ] sys.settrace cause curried parms to show up as attributes

2006-10-03 Thread SourceForge.net
Bugs item #1569356, was opened at 2006-10-02 11:26 Message generated for change (Comment added) made by scott_marks You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1569356group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1563630 ] IDLE doesn't load - apparently without firewall problems

2006-10-03 Thread SourceForge.net
Bugs item #1563630, was opened at 2006-09-22 12:19 Message generated for change (Comment added) made by jordanramz You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1563630group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1570417 ] 2.4 2.5 can't create win installer on linux

2006-10-03 Thread SourceForge.net
Bugs item #1570417, was opened at 2006-10-04 13:45 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1570417group_id=5470 Please note that this message will contain a full copy of

[ python-Bugs-1484556 ] Output of KlocWork on Python2.4.3 sources

2006-10-03 Thread SourceForge.net
Bugs item #1484556, was opened at 2006-05-09 03:14 Message generated for change (Comment added) made by nnorwitz You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1484556group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1569998 ] 2.5 incorrectly permits break inside try statement

2006-10-03 Thread SourceForge.net
Bugs item #1569998, was opened at 2006-10-03 07:04 Message generated for change (Comment added) made by nnorwitz You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1569998group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1570284 ] Launcher reset to factory button provides bad command-line

2006-10-03 Thread SourceForge.net
Bugs item #1570284, was opened at 2006-10-03 14:17 Message generated for change (Comment added) made by nnorwitz You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1570284group_id=5470 Please note that this message will contain a full copy of the comment

<    1   2   3