RELEASED Mailman 2.1.7

2005-12-31 Thread Tokio Kikuchi
I'm pleased to announce the release of GNU Mailman 2.1.7. This is a significant release, which includes security enhancement fixes, a new language (ia: Interlingua) support, a couple of new features, and many bug fixes. Mailman is free software for managing email mailing lists and e-newsletters.

Re: python coding contest

2005-12-31 Thread Just
In article [EMAIL PROTECTED], Christoph Zwerschke [EMAIL PROTECTED] wrote: Mark Dickinson wrote: Here's a variant of André's brilliant idea that's 119 characters long, and fully printable: j=''.join;seven_seg=lambda z:j(j(' _ | |_ _|_|' [ord('^r|=Zm.:v\r'[int(a)])%u*2:][:3]for a

Re: Memoization and encapsulation

2005-12-31 Thread Just
In article [EMAIL PROTECTED], Steven D'Aprano [EMAIL PROTECTED] wrote: I was playing around with simple memoization and came up with something like this: _cache = {} def func(x): global _cache There's no need to declare _cache as global, since you're not assigning to it. So this

Re: python coding contest

2005-12-31 Thread Just
In article [EMAIL PROTECTED], Just [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Christoph Zwerschke [EMAIL PROTECTED] wrote: Mark Dickinson wrote: Here's a variant of André's brilliant idea that's 119 characters long, and fully printable: j=''.join;seven_seg=lambda

py-cocoa?

2005-12-31 Thread Lin-Chieh Shangkuan
It's known that combining GTK+ or Qt with Python could enable the GUI design with pygtk/pyqt. In Mac OSX, it's suggested that use Cocoa be the GUI framework. Is there py-cocoa framework? -- http://mail.python.org/mailman/listinfo/python-list

Re: python coding contest

2005-12-31 Thread Paddy
So, testosterone wins again! We get to boast: Mine's smaller than your's Lets wait for Pythonic to go to bed, then sneak downstairs, go to that tripple-X rated 'shortest solutions' website, and 'whack-off' some solutions. Unghhh, my solution... its coming!!! Well don't forget to clean up

Re: py-cocoa?

2005-12-31 Thread Just
In article [EMAIL PROTECTED], Lin-Chieh Shangkuan [EMAIL PROTECTED] wrote: It's known that combining GTK+ or Qt with Python could enable the GUI design with pygtk/pyqt. In Mac OSX, it's suggested that use Cocoa be the GUI framework. Is there py-cocoa framework? PyObjC. Just --

Re: generators in Java?

2005-12-31 Thread Diez B. Roggisch
Tom Sheffler schrieb: This may have been discussed before, so I apologize. Does Java have generators? I am aware of the Iterator interface, but it seems much more restrictive. Python generators are useful for many more things than simply list enumeration, but the Java Iterator seems

Re: python coding contest

2005-12-31 Thread Christoph Zwerschke
Just wrote: Duh, sorry, it's early. 118 is better than 119. Printable or not :) Still, a 119 bytes version that is fully printable is pretty cool. No, you're right, I also somehow missed the point. I believed » to be printable (opposed to control char's) but technically speaking, the

Re: python encoding bug?

2005-12-31 Thread Vincent Wehren
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | | I was playing with python encodings and noticed this: | | [EMAIL PROTECTED]:~$ python2.4 | Python 2.4 (#2, Dec 3 2004, 17:59:05) | [GCC 3.3.5 (Debian 1:3.3.5-2)] on linux2 | Type help, copyright, credits or license for more

Re: Memoization and encapsulation

2005-12-31 Thread skip
just I actually prefer such a global variable to the default arg just trick. The idiom I generally use is: just _cache = {} just def func(x): just result = _cache.get(x) just if result is None: just result = x + 1 # or a time consuming calculation...

Re: py-cocoa?

2005-12-31 Thread [EMAIL PROTECTED]
PyObjC ( http://pyobjc.sourceforge.net ) is what you are looking for. -- http://mail.python.org/mailman/listinfo/python-list

Re: Memoization and encapsulation

2005-12-31 Thread Steven D'Aprano
On Fri, 30 Dec 2005 21:08:29 -0800, Raymond Hettinger wrote: Steven D'Aprano wrote: I was playing around with simple memoization and came up with something like this: [snip] Try something like this: def func(x, _cache={}): if x in cache: return cache[x] result = x + 1

Re: Memoization and encapsulation

2005-12-31 Thread Steven D'Aprano
On Sat, 31 Dec 2005 09:23:05 +0100, Just wrote: There's no need to declare _cache as global, since you're not assigning to it. So this global isn't all that pesky after all... It is still a global variable, with all the potential Badness thereof, even if you don't have to declare it. --

Re: python encoding bug?

2005-12-31 Thread Benjamin Niemann
[EMAIL PROTECTED] wrote: I was playing with python encodings and noticed this: [EMAIL PROTECTED]:~$ python2.4 Python 2.4 (#2, Dec 3 2004, 17:59:05) [GCC 3.3.5 (Debian 1:3.3.5-2)] on linux2 Type help, copyright, credits or license for more information. unicode('\x9d', 'iso8859_1')

Vector math library

2005-12-31 Thread Martin Vilcans
Hi, I'm new to this mailing list and fairly new to Python as well. I'm working on a prototype for a 3D game using OpenGL, and take this opportunity to learn Python better. I'm looking for a good library for vector math. I need to do vector addition, cross products, dot products etc. and

Re: python coding contest

2005-12-31 Thread Christian Tismer
André wrote: For the few that might be interested, I will be posting the details of a 117 character long solution to the challenge on my blog http://aroberge.blogspot.com/. Congratulations! I'm very impressed by this elegant solution. It seems to be very hard to improve. No idea if this is

advanced module/import/namespace idioms

2005-12-31 Thread chuck
Every once in awhile I run across a python module that might have statements like: for c in sys.modules[module].__dict__.values(): or import __builtin__ __builtin__.__dict__['_'] = lambda x: x Snurf also does some strange import trickory (see

Re: predicting function calls?

2005-12-31 Thread Ernst Noch
Roy Smith wrote: I think I know the answer to this, but I'll ask it just in case there's something I hadn't considered... I'm working on a python interface to a OODB. Communication with the DB is over a TCP connection, using a model vaguely based on CORBA. I'll be creating object handles

Re: Vector math library

2005-12-31 Thread Bas
I am not a regular user of the libraries that you mention, but I played around with some of them because I need a replacement for Matlab. Numeric, NumArray and SciPy should be more or less compatible. All the functions you mention should be in there, or otherwise should be trivial to implement.

Problem compiling an extension with MS Visual C++ Toolkit 2003

2005-12-31 Thread Andreas
Extension: --- pyshapelib 0.3 with Python 2.4 Problem: - D:\Python24\Lib\site-packages\shapelib\setuppytest.py Traceback (most recent call last): File D:\Python24\Lib\site-packages\shapelib\setup\pytest.py, line 1, in ? import shapelib, dbflib, shptree File

Re: predicting function calls?

2005-12-31 Thread Roy Smith
In article [EMAIL PROTECTED], Ernst Noch [EMAIL PROTECTED] wrote: Couldn't you just, for every access to a member of your object, first try to treat is as an access to an operation? If this fails (you mentioned the db will throw an error if this is an attribute instead of an operation),

Re: Vector math library

2005-12-31 Thread jelle
martin, pyformex has a vector module as well. its not very pythonic, but it could help you out creating a version of your own. worth checking out -- http://mail.python.org/mailman/listinfo/python-list

bsddb3 locking questions

2005-12-31 Thread Eric S. Johansson
are there any simple examples of how to do record locking with bsddb3? the bsddb3 documentation is reasonably opaque. For example, the DB initialization requires a DBEnv instance for certain environmental features such as locking. but if you want locking, what happens next? I suspect the

Array construction from object members

2005-12-31 Thread MKoool
Hi everyone, I am doing several operations on lists and I am wondering if python has anything built in to get every member of several objects that are in an array, for example, if i have a class like the following: class myClass: a = 0.0 And lets say I populate the a element in an array of

Re: Xah's Edu Corner: Examples of Quality Technical Writing

2005-12-31 Thread Brad Baxter
Xah Lee wrote: i had the pleasure to read the PHP's manual today. http://www.php.net/manual/en/ although Pretty Home Page is another criminal hack of the unix lineage, but if we are here to judge the quality of its documentation, it is a impeccability. it has or possesses properties of:

logging module example

2005-12-31 Thread Chris Smith
Hola, pythonisas: The documentation for the logging module is good, but a bit obscure. In particular, there seems to be a lot of action at a distance. The fact that getLogger() can actually be a call to Logger.__init__(), which is mentioned in para 6.29.1, also bears stressing on 6.29. I grasp

Re: Array construction from object members

2005-12-31 Thread Gerard Flanagan
MKoool wrote: Hi everyone, I am doing several operations on lists and I am wondering if python has anything built in to get every member of several objects that are in an array, for example, if i have a class like the following: class myClass: a = 0.0 And lets say I populate the a

Re: Newbie - SOAP return message with embedded ZIP file

2005-12-31 Thread Rodney
I actually tried both SOAPpy and ZSI but both return a error message with the incoming SOAP message that basicly said it was not a proper SOAP message. Diez B. Roggisch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Rodney schrieb: Hi again, thanks for the help with figuring

Re: logging module example

2005-12-31 Thread Diez B. Roggisch
Chris Smith schrieb: Hola, pythonisas: The documentation for the logging module is good, but a bit obscure. In particular, there seems to be a lot of action at a distance. The fact that getLogger() can actually be a call to Logger.__init__(), which is mentioned in para 6.29.1, also bears

Re: Newbie - SOAP return message with embedded ZIP file

2005-12-31 Thread Diez B. Roggisch
Rodney schrieb: I actually tried both SOAPpy and ZSI but both return a error message with the incoming SOAP message that basicly said it was not a proper SOAP message. Can you show us an actual working (or _not_ working) example of how and what you're trying? My mind-reading-skills aren't

Re: Writing pins to the RS232

2005-12-31 Thread Michael Schneider
Jay, Couple of points that may help you. 1) A serial port does not have data ports 0-n. A serial port takes a byte (8 bits), then shifts them down a single pipe using a chip called a UART (feel free to google for unfamiliar terms). example Bit pattern 1010 1010 would be shifted one bit at a

Re: bsddb3 locking questions

2005-12-31 Thread Eric S. Johansson
Eric S. Johansson wrote: are there any simple examples of how to do record locking with bsddb3? got this far with sample code from the activeware site filename = 'fruit' # Get an instance of BerkeleyDB db_env = db.DBEnv() db.set_lk_detect(db.DB_LOCK_YOUNGEST)

Re: Array construction from object members

2005-12-31 Thread Paul McGuire
MKoool [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi everyone, I am doing several operations on lists and I am wondering if python has anything built in to get every member of several objects that are in an array, -snip- Here's some sample code to show you how list

Re: Vector math library

2005-12-31 Thread Scott David Daniels
Martin Vilcans wrote: Hi, I'm new to this mailing list and fairly new to Python as well. I'm working on a prototype for a 3D game using OpenGL, and take this opportunity to learn Python better. I'm looking for a good library for vector math. I need to do vector addition, cross products,

Re: advanced module/import/namespace idioms

2005-12-31 Thread Scott David Daniels
chuck wrote: Every once in awhile I run across a python module that might have statements like: for c in sys.modules[module].__dict__.values(): Straight-forwardly imported modules wind up in sys.modules, keyed by their module name. So t = sys.modules['name'] is like import name as t. Work

Application architecture (long post - sorry)

2005-12-31 Thread limeydrink
Hi all, I want to create a mobile field worker data solution. Let me explain... I work for a company that has some software used by call takers to enter information into a database about faults with electrical appliances they manufacture, sell to customers, and then provide maintenance

Re: Application architecture (long post - sorry)

2005-12-31 Thread Mike Meyer
[EMAIL PROTECTED] writes: I have looked at the options for developing the client for these electronic job sheets and have decided upon Microsoft Pocket PC and the .net compact framework. It seems the easiest environment for developing and the PDA's can be obtained very cheaply as a package

Python article in Free Software Magazine

2005-12-31 Thread Kirk Strauser
I wrote this article which was published in Free Software Magazine: http://www.freesoftwaremagazine.com/free_issues/issue_09/intro_zope_1/ It's intended as a high-level overview of the language, and therefore glosses over some of the details. For example, I describe its function calling

Re: Vector math library

2005-12-31 Thread [EMAIL PROTECTED]
And then more! I started out using cgtypes from the cgkit. Lots of other graphics goodies in there also: http://cgkit.sourceforge.net/doc/cgtypes.html In the end I ended up rolling my own to better understand the whole thing. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python article in Free Software Magazine

2005-12-31 Thread Gerard Flanagan
Kirk Strauser wrote: I wrote this article which was published in Free Software Magazine: http://www.freesoftwaremagazine.com/free_issues/issue_09/intro_zope_1/ It's intended as a high-level overview of the language, and therefore glosses over some of the details. For example, I describe

Re: python coding contest

2005-12-31 Thread André
Christian Tismer wrote: André wrote: For the few that might be interested, I will be posting the details of a 117 character long solution to the challenge on my blog http://aroberge.blogspot.com/. ... It seems to be very hard to improve. No idea if this is possible: One might try to

Re: Vector math library

2005-12-31 Thread Erik Max Francis
Martin Vilcans wrote: Hi, I'm new to this mailing list and fairly new to Python as well. I'm working on a prototype for a 3D game using OpenGL, and take this opportunity to learn Python better. I'm looking for a good library for vector math. I need to do vector addition, cross products,

PYTHONDOCS

2005-12-31 Thread J. D. Leach
OK, I'm stupid. I have been unable to discern (even Googled) a way to set the PYTHONDOCS variable to point to where the HTML files are. What to do? I need to know the process and where theses variables are stored. -- J. D. Leach Columbus, Indiana USA Linux/Open Source Computer using:

Re: scrape url out of brackets?

2005-12-31 Thread homepricemaps
so you recommend using some sort of for statement with the html parser where i tell it to only parse stuff found in the tr tag for instance? Ravi Teja wrote: Regular Expressions are the most common way. http://docs.python.org/lib/module-re.html HTML parser is another

Re: python coding contest

2005-12-31 Thread Hans Nowak
André wrote: Christian Tismer wrote: It seems to be very hard to improve. No idea if this is possible: One might try to re-order the character string a bit to change moduli, trying to get one more number in (3,14,10) to be one-digit. Haven't tried, yet, and chances are small. congrats again

Re: Hypergeometric distribution

2005-12-31 Thread Raven
Thanks to all of you guys, I could resolve my problem using the logarithms as proposed by Robert. I needed to calculate the factorial for genomic data, more specifically for the number of genes in the human genome i.e. about 30.000 and that is a big number :-) I didn't know gmpy Thanks a lot,

Re: PYTHONDOCS

2005-12-31 Thread Fernando Perez
J. D. Leach wrote: OK, I'm stupid. I have been unable to discern (even Googled) a way to set the PYTHONDOCS variable to point to where the HTML files are. What to do? I need to know the process and where theses variables are stored. It's an environment variable. In my case:

Re: logging module example

2005-12-31 Thread Chris Smith
Diez == Diez B Roggisch [EMAIL PROTECTED] writes: Diez Chris Smith schrieb: Hola, pythonisas: The documentation for the logging module is good, but a bit obscure. In particular, there seems to be a lot of action at a distance. The fact that getLogger() can actually be a

Re: PYTHONDOCS

2005-12-31 Thread Chris Smith
J == J D Leach [EMAIL PROTECTED] writes: J OK, I'm stupid. I have been unable to discern (even Googled) a J way to set the PYTHONDOCS variable to point to where the HTML J files are. What to do? I need to know the process and where J theses variables are stored. -- J. D. Leach

Re: python coding contest

2005-12-31 Thread André
Hans Nowak wrote: André wrote: I don't know if this suggestion has been made already, but it seems to me that the end of the expression ... for u in(3,14,10)) can be written as: ... for u in 3,14,10) which would shave off a character. Tuples don't always need parentheses...

Re: python coding contest

2005-12-31 Thread Hans Nowak
André wrote: Hans Nowak wrote: André wrote: I don't know if this suggestion has been made already, but it seems to me that the end of the expression ... for u in(3,14,10)) can be written as: ... for u in 3,14,10) which would shave off a character. Tuples don't always need

Re: python coding contest

2005-12-31 Thread Christian Tismer
Hans Nowak wrote: ... for u in(3,14,10)) can be written as: ... for u in 3,14,10) which would shave off a character. Tuples don't always need parentheses... This would work with a list comprehension. Doesn't work with a generator expression (thought of it, too, and the list

Re: python coding contest

2005-12-31 Thread Claudio Grondi
Please send me comments, suggestions and ideas. Now, after the contest is over I analysed the outcome of it and have come to the conclusion, that there were two major factors which contributed to squeezing of code: (1). usage of available variants for coding of the same thing (2).

Re: Global Variables in OOP and Python

2005-12-31 Thread Steven D'Aprano
On Sat, 31 Dec 2005 21:21:29 +, Dennis Lee Bieber wrote: On Sat, 31 Dec 2005 11:37:38 +1100, Steven D'Aprano [EMAIL PROTECTED] declaimed the following in comp.lang.python: Do you mean something like this? # Module care_and_feeding import birds import foods def feed_my_pet():

Re: PYTHONDOCS

2005-12-31 Thread Mike Meyer
Chris Smith [EMAIL PROTECTED] writes: J == J D Leach [EMAIL PROTECTED] writes: I'm stupider; I can't ATFQ for you. But last night I stayed at a Holiday Inn Express, and can recommend http://projects.edgewall.com/python-sidebar/ Which, assuming you've got connectivity, is teh shiznit.

Weekly Python Patch/Bug Summary

2005-12-31 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 382 open ( +3) / 3003 closed ( +1) / 3385 total ( +4) Bugs: 903 open (-11) / 5479 closed (+27) / 6382 total (+16) RFE : 203 open ( -1) / 195 closed ( +2) / 398 total ( +1) New / Reopened Patches __

Re: python coding contest

2005-12-31 Thread Steven D'Aprano
On Sun, 01 Jan 2006 03:34:33 +0100, Claudio Grondi wrote: Please send me comments, suggestions and ideas. Now, after the contest is over I analysed the outcome of it and have come to the conclusion, that there were two major factors which contributed to squeezing of code: (1). usage

IDE for Python ?

2005-12-31 Thread news
I'm getting realy tired of learning new languages. And especially frustrated at the 'syntax errors' when switching between them. There are basically only a few common concepts needed for all the languages. Hence linux's p2c: Pascal to C translator. A good IDE could hide the irrelevant details

Re: Array construction from object members

2005-12-31 Thread Steven D'Aprano
On Sat, 31 Dec 2005 09:01:44 -0800, MKoool wrote: Hi everyone, I am doing several operations on lists and I am wondering if python has anything built in to get every member of several objects that are in an array, for example, if i have a class like the following: class myClass: a =

Re: Python article in Free Software Magazine

2005-12-31 Thread Steven D'Aprano
On Sat, 31 Dec 2005 14:42:36 -0600, Kirk Strauser wrote: I wrote this article which was published in Free Software Magazine: http://www.freesoftwaremagazine.com/free_issues/issue_09/intro_zope_1/ It's intended as a high-level overview of the language, and therefore glosses over some of

[ python-Bugs-1394565 ] SimpleHTTPServer doesn't understand query arguments

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

[ python-Bugs-1394612 ] 'Plus' filemode exposes uninitialized memory on win32

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

[ python-Bugs-1394612 ] 'Plus' filemode exposes uninitialized memory on win32

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

[ python-Bugs-1394612 ] 'Plus' filemode exposes uninitialized memory on win32

2005-12-31 Thread SourceForge.net
Bugs item #1394612, was opened at 2005-12-31 19:06 Message generated for change (Settings changed) made by tim_one You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1394612group_id=5470 Please note that this message will contain a full copy of the comment