ANN: PyMite release 07

2009-03-09 Thread dwhall
== PyMite == :Author: Dean Hall :Copyright: Copyright 2002 Dean Hall. All rights reserved. PyMite is offered through one of two licenses: commercial or open-source. See the LICENSE file at the root of the package for licensing details. :Release: 07 :Site:

Packaging Survey

2009-03-09 Thread Tarek Ziadé
The Python Langage Summit is coming up. To prepare this event, I have put online a survey you can take to tell us a bit more about you and how you package your Python applications. * Who should take the survey : any Python developer that packages and distributes his code, no matter how. *

Elisa Media Center 0.5.31 Release

2009-03-09 Thread Olivier Tilloy
Dear Python users, The Elisa team is happy to announce the release of Elisa Media Center 0.5.31, code-named Voorspel In Sofia. Elisa is a cross-platform and open-source Media Center written in Python. It uses GStreamer [1] for media playback and pigment [2] to create an appealing and intuitive

ANN Chicago Python User Group (ChiPy) March Meeting: Scientists, VIM, and Thrift

2009-03-09 Thread Brian Ray
Chicago Python User Group = For the first time ever (not really) ChiPy will return to the same venue two months in a row! Sully's on the North Side, Near North and Clybourn. Heading off the ChiPy efforts will be another sequel from last month. James Snyder will

Re: 2.6.1 - simple division

2009-03-09 Thread Lie Ryan
Duncan Booth wrote: farsi...@gmail.com wrote: Thanks all, that's very helpful, sorry to waste your time with a common question. I have tried the decimal module and will definitely keep using it if I need to do this kind of calculation again. Try to remember though that the decimal module

Implementing chain of responsibility

2009-03-09 Thread koranthala
Hi, I want to implement chain of responsibility pattern in Python (for a Django project) The problem that I see is a rather odd one - how to link the subclasses with the super class. Ex: Suppose the two child classes are as given below (A1, A2 child classes of A) class A: ... class

Re: Translating pysnmp oids to human readable strings

2009-03-09 Thread Shantanu Joshi
SpamMePlease PleasePlease spankthes...@googlemail.com writes: On Fri, Mar 6, 2009 at 2:14 PM, Shantanu Joshi weemadart...@gmail.com wrote: SpamMePlease PleasePlease spankthes...@googlemail.com writes: .. snip The thing is that I have copied the file (as you may see, I did 'ls -lA' on it.

Re: Do python.org MacOS X dmg installers still only provide 32 bit Python framework?

2009-03-09 Thread Martin v. Löwis
Graham Dumpleton wrote: I'd rather not have to download and install them as I don't want to be installing them into my actual system, so can someone please tell me whether the MacOS X dmg installers provided from www.python.org are still not full universal builds. That is, that the Python

Re: Implementing chain of responsibility

2009-03-09 Thread Chris Rebert
On Sun, Mar 8, 2009 at 11:53 PM, koranthala koranth...@gmail.com wrote: Hi,    I want to implement chain of responsibility pattern in Python (for a Django project)    The problem that I see is a rather odd one - how to link the subclasses with the super class. Grabbing out my copy of Head

Re: last and final attempt to search for python ods library.

2009-03-09 Thread Krishnakant
Hi Terry, Well, You did reply i know, but seems i lost that mail some where, My mail client must have messed up the mail. any ways thanks for your reply, Right now I am stuck very badly. The problem is that I am trying python-ooolib and did find the library pritty good. But the problem is that

Re: create boolean

2009-03-09 Thread Andre Engels
On Mon, Mar 9, 2009 at 12:48 AM, Grant Edwards gra...@visi.com wrote: I didn't say that he hadn't authorized that assumption.  I just said that the code does rely on such an assumption.  In my experience, assumptions like that result broken code down the road. And assumptions like when

Re: Candidate for a new itertool

2009-03-09 Thread Raymond Hettinger
On Mar 7, 7:58 pm, bearophileh...@lycos.com wrote: Raymond Hettinger, maybe it can be useful to add an optional argument flag to tell such split_on to keep the separators or not? This is the xsplit I usually use: In your experiences with xsplit(), do most use cases involve removing the

Re: create boolean

2009-03-09 Thread Steve Holden
Lie Ryan wrote: Fencer wrote: Hi, I need a boolean b to be true if the variable n is not None and not an empty list, otherwise b should be false. I ended up with: b = n is not None and not not n which seems to work but is that normally how you would do it? It can be assumed that n is always

Re: A Dangling Tk Entry

2009-03-09 Thread Marc 'BlackJack' Rintsch
On Sun, 08 Mar 2009 22:20:09 -0700, W. eWatson wrote: You didn't answer my question why entry is necessary at all. The original author thought it was necessary to return entry. I'll give you a peek at a segment of the code I'm working with here: class

Re: wxPython fast and slow

2009-03-09 Thread iu2
On Mar 9, 4:18 am, David Bolen db3l@gmail.com wrote: iu2 isra...@elbit.co.il writes: Then even a time.sleep() or plain loop isn't sufficient since each may have additional latencies depending on load.  You will probably need to query a system clock of some type to verify when your

a potential pep to extend the syntax of for loops

2009-03-09 Thread pang
Hello, This is an idea about something I'd like to see implemented in python. I understand that's the purpose of PEPs, so I'll write it as a PEP, but send it here to receive your valuable feedback. Abstract This is a proposal to increase the richness of for loops, only to the extent that it

Re: Ban Xah Lee

2009-03-09 Thread Larry Gates
On Mon, 9 Mar 2009 03:19:19 + (UTC), Steve Sobol wrote: On 2009-03-09, Kenneth Tilton kentil...@gmail.com wrote: Buddha taught that the universe is ineluctably a single interconnected web of cause and effect, which is my haughty preamble to this observation: it depends on the

Re: a potential pep to extend the syntax of for loops

2009-03-09 Thread Chris Rebert
On Mon, Mar 9, 2009 at 2:15 AM, pang pablo.ang...@uam.es wrote:  Hello,  This is an idea about something I'd like to see implemented in python. I understand that's the purpose of PEPs, so I'll write it as a PEP, but send it here to receive your valuable feedback. Abstract This is a

a problem in datetime.interval()

2009-03-09 Thread lameck kassana
hi , I am writing a scriot which will move old files from one directory to backup The files are in mode *20090307* mean *mmmdd* to new files. The script is below is like this *import os import datetime import time from datetime import date today=date.today()* *for x in range(5,10):

Re: a problem in datetime.interval()

2009-03-09 Thread Andre Engels
On Mon, Mar 9, 2009 at 10:57 AM, lameck kassana lkass...@gmail.com wrote: hi , I am writing a scriot which will move old files from one directory to backup The files are in mode *20090307* mean *mmmdd* to new files. The script is below is like this import os import datetime import time

Re: Ban Xah Lee

2009-03-09 Thread Larry Gates
On Sun, 08 Mar 2009 04:09:52 +, Dirk Bruere at NeoPax wrote: Dirk Bruere at NeoPax wrote: Well, don't worry - nobody is going to ban you from Usenet (except possibly the Chinese govt). OTOH, nobody here much cares. So, rant on - it's what Usenet is for. ☄ --- what is that char?

Re: Ban Xah Lee

2009-03-09 Thread Chris Rebert
On Mon, Mar 9, 2009 at 4:12 AM, Larry Gates la...@example.invalid wrote: On Sun, 08 Mar 2009 04:09:52 +, Dirk Bruere at NeoPax wrote: Dirk Bruere at NeoPax wrote: Well, don't worry - nobody is going to ban you from Usenet (except possibly the Chinese govt). OTOH, nobody here much cares.

Is python worth learning as a second language?

2009-03-09 Thread ZikO
Hi I hope I won't sound trivial with asking my question. I am a C++ programmer and I am thinking of learning something else because I know second language might be very helpful somehow. I have heard a few positive things about Python but I have never writen any single line in python so I do

Re: a potential pep to extend the syntax of for loops

2009-03-09 Thread Lie Ryan
Hello, This is an idea about something I'd like to see implemented in python. I understand that's the purpose of PEPs, so I'll write it as a PEP, but send it here to receive your valuable feedback. Abstract This is a proposal to increase the richness of for loops, only to the extent that it

Re: Is python worth learning as a second language?

2009-03-09 Thread bearophileHUGS
ZikO, if you know C++, then knowing one scripting language is useful, it can be Ruby, Python (or even Lua, etc). Note that learning a language isn't a binary thing, so I suggest you to use a week to learn Python and use it try to solve some of your practical problems. After a week you will be able

Re: Implementing chain of responsibility

2009-03-09 Thread koranthala
On Mar 9, 12:16 pm, Chris Rebert c...@rebertia.com wrote: On Sun, Mar 8, 2009 at 11:53 PM, koranthala koranth...@gmail.com wrote: Hi,    I want to implement chain of responsibility pattern in Python (for a Django project)    The problem that I see is a rather odd one - how to link the

Re: Is python worth learning as a second language?

2009-03-09 Thread Chris Rebert
On Mon, Mar 9, 2009 at 3:43 AM, ZikO ze...@op.pl wrote: Hi I hope I won't sound trivial with asking my question. I am a C++ programmer and I am thinking of learning something else because I know second language might be very helpful somehow. I have heard a few positive things about Python

Re: Ban Xah Lee

2009-03-09 Thread RedGrittyBrick
Larry Gates wrote: On Sun, 08 Mar 2009 04:09:52 +, Dirk Bruere at NeoPax wrote: Dirk Bruere at NeoPax wrote: Well, don't worry - nobody is going to ban you from Usenet (except possibly the Chinese govt). OTOH, nobody here much cares. So, rant on - it's what Usenet is for. ☄ --- what

Re: Is python worth learning as a second language?

2009-03-09 Thread Lie Ryan
ZikO wrote: Hi I hope I won't sound trivial with asking my question. I am a C++ programmer and I am thinking of learning something else because I know second language might be very helpful somehow. I have heard a few positive things about Python but I have never writen any single line in

Re: Implementing chain of responsibility

2009-03-09 Thread Chris Rebert
On Mon, Mar 9, 2009 at 3:54 AM, koranthala koranth...@gmail.com wrote: On Mar 9, 12:16 pm, Chris Rebert c...@rebertia.com wrote: On Sun, Mar 8, 2009 at 11:53 PM, koranthala koranth...@gmail.com wrote: Hi,    I want to implement chain of responsibility pattern in Python (for a Django

Re: A Dangling Tk Entry

2009-03-09 Thread W. eWatson
Marc 'BlackJack' Rintsch wrote: On Sun, 08 Mar 2009 22:20:09 -0700, W. eWatson wrote: You didn't answer my question why entry is necessary at all. The original author thought it was necessary to return entry. I'll give you a peek at a segment of the code I'm working with here: class

Re: Is python worth learning as a second language?

2009-03-09 Thread Tim Wintle
On Mon, 2009-03-09 at 11:19 +, Lie Ryan wrote: Certainly. A programmer that only knows one language would be too limited. Try as many programming language as you can, and especially look for programming languages that have obscenely different paradigm than the language you already know.

Re: Do python.org MacOS X dmg installers still only provide 32 bit Python framework?

2009-03-09 Thread Graham Dumpleton
On Mar 9, 6:14 pm, Martin v. Löwis mar...@v.loewis.de wrote: Graham Dumpleton wrote: I'd rather not have to download and install them as I don't want to be installing them into my actual system, so can someone please tell me whether the MacOS X dmg installers provided fromwww.python.orgare

Re: Is python worth learning as a second language?

2009-03-09 Thread Geoff Smith
In article gp2rtc$nj...@news.onet.pl, ze...@op.pl says... Hi I hope I won't sound trivial with asking my question. I am a C++ programmer and I am thinking of learning something else because I know second language might be very helpful somehow. I have heard a few positive things about

Re: Is python worth learning as a second language?

2009-03-09 Thread Bruno Desthuilliers
ZikO a écrit : Hi I hope I won't sound trivial with asking my question. I am a C++ programmer and I am thinking of learning something else because I know second language might be very helpful somehow. Indeed. FWIW, I use about four programming languages on a daily basis - plus

Re: Is python worth learning as a second language?

2009-03-09 Thread Nick Craig-Wood
ZikO ze...@op.pl wrote: I am a C++ programmer and I am thinking of learning something else because I know second language might be very helpful somehow. I have heard a few positive things about Python but I have never writen any single line in python so I do not know this language at

Re: Candidate for a new itertool

2009-03-09 Thread bearophileHUGS
Raymond Hettinger: In your experiences with xsplit(), do most use cases involve removing the separators? Unfortunately I am not able to tell you how often I remove them. But regarding strings, I usually want to remove separators: aXcdXfg.split(X) ['a', 'cd', 'fg'] So sometimes I want to do

Re: Is python worth learning as a second language?

2009-03-09 Thread Michele Simionato
On Mar 9, 12:47 pm, Tim Wintle tim.win...@teamrubber.com wrote: My slight issue with this list that I think things are in too many places. E.g. although you can do functional programming in Python (and many do), I think it's worth trying to learn a language like lisp just for the sake of

Re: Is python worth learning as a second language?

2009-03-09 Thread Lie Ryan
Michele Simionato wrote: On Mar 9, 12:47 pm, Tim Wintle tim.win...@teamrubber.com wrote: My slight issue with this list that I think things are in too many places. Yeah, that issue did pass through my head when I posted it, but I was too lazy to do proper listing of various language from

Re: Is python worth learning as a second language?

2009-03-09 Thread Grant Edwards
On 2009-03-09, ZikO ze...@op.pl wrote: Do you think python would be good complementary language for C++? Yes. Do you think it's worth learning it or let's say try Java? Either would be good, Python is probably both easier to learn and a lot easier to use (at least on Unix). and how

Re: create boolean

2009-03-09 Thread Grant Edwards
On 2009-03-09, Andre Engels andreeng...@gmail.com wrote: On Mon, Mar 9, 2009 at 12:48 AM, Grant Edwards gra...@visi.com wrote: I didn't say that he hadn't authorized that assumption. ??I just said that the code does rely on such an assumption. ??In my experience, assumptions like that result

Re: pydeflate

2009-03-09 Thread gagsl-py2
De: Atrant SG atrant...@gmail.com Para: gagsl-...@yahoo.com.ar Enviado: domingo 8 de marzo de 2009, 12:23:06 Asunto: pydeflate I've read the topic here http://www.gossamer-threads.com/lists/python/python/678374 and I'd like to download pydeflate module, but its official site seems not to

Re: RichCompare and RichCompareBool

2009-03-09 Thread Aaron Brady
On Mar 7, 11:39 pm, Steven D'Aprano st...@pearwood.info wrote: Aaron Brady wrote: Hi.  Just bringing it up again.  I feel the docs should mention it at least, and there should possibly be a separate function. Post a bug report or feature request on the tracker, or nothing will happen. If

Re: Is python worth learning as a second language?

2009-03-09 Thread Bruno Desthuilliers
Grant Edwards a écrit : (snip) Knowing C++ does tend to be a bit of a handicap, but I think any competent programmer could learn Python. +2 QOTW !-) -- http://mail.python.org/mailman/listinfo/python-list

Any c header parser for generate ctypes module?

2009-03-09 Thread Victor Lin
Hi, I am writing python binding for some c library. It is really a super boring job. Copy... paste... modify.. copy paste...modify I am wondering, I am a programmer, why I can't do this job like a programmer? So I think the best way to write binding for those c libraries, is to write a parser

Re: a potential pep to extend the syntax of for loops

2009-03-09 Thread pang
for x in range(10) for y in range(10) if x+y==5: print x,y What is that supposed to mean? Nested looping? Why is that (confusing thing) better than: from itertools import product for x, y in product(range(10), range(10)) if x + y == 5:      print x, y That confusing thing is what

Re: factory functions methods

2009-03-09 Thread Aaron Brady
On Mar 8, 5:45 pm, andrew cooke and...@acooke.org wrote: Aaron Brady wrote: Hello, I am creating a container.  I have some types which are built to be members of the container.  The members need to know which container they are in, as they call methods on it, such as finding other

A parser for S.W.I.F.T. MT940 Files (for banking transactions)

2009-03-09 Thread Saki
Hello, I need an MT940 file parses. It can be either a pure python library or a binding/wrapper, no matter. Almost all european banks provide transactions extract in MT940 format. There are parsers around, but none of them are for python. Any help is greatly appreciated. Thanks, Saki --

reloading all modules

2009-03-09 Thread Noam Aigerman
Hi, Is there a way to use the reload() func or something else, to refresh all of the modules you have imported? I don't care whether the module that will run this code will be reloaded or not, so whichever is the easiest... Thanks, Noam -- http://mail.python.org/mailman/listinfo/python-list

Re: Is python worth learning as a second language?

2009-03-09 Thread Marco Mariani
ZikO wrote: Do you think python would be good complementary language for C++? Do you think it's worth learning it Absolutely, but it tends to become the first language over time. Don't underestimate its reach. I've re-learned Python 3 or 4 times already, over 11 years :-/ --

Re: Python3 on the Web

2009-03-09 Thread Tim Roberts
Johannes Permoser ee...@yahoo.de wrote: But what's the way to bring python3 to the Web? mod_python isn't available, cgi is said to be slow, mod_wsgi looks complicated... Ordinary CGI has, in my opinion, an undeserved bad rap. If you're going to be making a web site that has to handle 100 hits a

Re: Ban Xah Lee

2009-03-09 Thread Arved Sandstrom
Xah Lee xah...@gmail.com wrote in message news:a3ee929d-0b9b-4bbf-9cf3-5dcc6ddbc...@d19g2000yqb.googlegroups.com... [ SNIP ] This page is a short collection of online communities that banned me, in a way that i don't consider just. It illustrates the political nature among the tech geeking males.

wxPython text alignment again

2009-03-09 Thread alejandro
I managed to align the text to the right but when I change it with a function it gets messy What is wrong now? class OpcijeFolija(wx.Dialog): def __init__(self, parent, id, title): wx.Dialog.__init__(self,parent, id, title, size=(300,300))

Re: Ban Xah Lee

2009-03-09 Thread Kenneth Tilton
Roedy Green wrote: On Sat, 7 Mar 2009 14:52:02 -0800 (PST), Xah Lee xah...@gmail.com wrote, quoted or indirectly quoted someone who said : I consider this post relevant because i've been perennially gossiped about in comp.lang.* groups today and in the past 5 or 10 years, many of the threads

Re: This should be a simple question...

2009-03-09 Thread Steven D'Aprano
Tim Chase wrote: If the constants don't actually share any conceptual commonality, then SteveH is right, that they really should just be globals. Surely that's backwards? If the constants don't share any conceptual commonality, they should be kept independent in the functions and not made

Re: Ban Xah Lee

2009-03-09 Thread William James
Haines Brown wrote: If we have studied a field obsessively for some years, it is natural that we end in a position where our knowledge will generally be superior. But this does not make us superior. What does make us superior? Are you so dishonest or insane as to assert that everyone is

Re: /a is not /a ?

2009-03-09 Thread Ben Finney
Emanuele D'Arrigo man...@gmail.com writes: I just find it peculiar more than a nuisance, but I'll go to the blackboard and write 100 times never compare the identities of two immutables. Thank you all! That's the wrong lesson to learn from this. The right lesson to learn is, “Equality

Re: Ban Xah Lee

2009-03-09 Thread Haines Brown
A glance at Ban Xah Lee's web page reveals that he is what is called an autodidact - someone who is self-taught. While this is an admirable achievement, it carries with it certain dangers. One is that it gives the illusion that learning is not a social activity, but an individual one. This is not

Need paid support on pycontactgrabber

2009-03-09 Thread Sanjay
Hi All, We have initiated a project named ContactGrabber to grab the contact emails from gmail, yahoo, rediff etc. The project is hosted at http://code.google.com/p/pycontactgrabber/ and is also available at cheeseshop. It is now working fine for 'gmail', 'yahoo' and 'rediff'. We need it for a

Re: Ban Xah Lee

2009-03-09 Thread Steve Sobol
On 2009-03-09, Kenneth Tilton kentil...@gmail.com wrote: Buddha taught that the universe is ineluctably a single interconnected web of cause and effect, which is my haughty preamble to this observation: it depends on the newsgroup. comp.lang.lisp is cool so here Xah participates as a

2.6.1 - simple division

2009-03-09 Thread farsight
4 / 5.0 0.84 0.8 * 5 4.0 python 2.6.1 on mac. What the hell is going on here? -- http://mail.python.org/mailman/listinfo/python-list

Re: last and final attempt to search for python ods library.

2009-03-09 Thread John Machin
On Mar 9, 6:40 pm, Krishnakant hackin...@gmail.com wrote: Hi Terry, Well, You did reply i know, but seems i lost that mail some where, My mail client must have messed up the mail. It sure messed up when it hijacked two existing threads when sending messages, so I'm not surprised if it's

Re: logging.handlers.SocketHandler

2009-03-09 Thread writeson
Vinay, I did as you suggested and everything seemed to work; client programs were able to reconnect to the servers and log messages started showing up soon after the logging server was running again. I did this with my Twisted client/server setup and it showed the same behavior; clients

Re: Any c header parser for generate ctypes module?

2009-03-09 Thread Diez B. Roggisch
Victor Lin wrote: Hi, I am writing python binding for some c library. It is really a super boring job. Copy... paste... modify.. copy paste...modify I am wondering, I am a programmer, why I can't do this job like a programmer? So I think the best way to write binding for those c

Re: Are there any python libraries/packages like Juicer/Sprockets/bundle_fu?

2009-03-09 Thread Phillip B Oldham
On Mar 4, 7:23 pm, Jason Scheirer jason.schei...@gmail.com wrote: Do you have a reason for needing the same thing implemented in Python, or are the options in Ruby enough? I'd rather have things in Python so I don't have to worry about having Ruby available on the host machines we're using.

Re: logging.handlers.SocketHandler

2009-03-09 Thread Vinay Sajip
On Mar 9, 2:10 pm, writeson doug.farr...@gmail.com wrote: My manager is suggesting that the underlying problem is using TCP rather than UDP (SocketHandler vs DatagramHandler) forloggingfrom clients to theloggingserver. His assertion is that using TCP would guarantee the loss of 2 messages at

Re: Is python worth learning as a second language?

2009-03-09 Thread grocery_stocker
On Mar 9, 5:30 am, Nick Craig-Wood n...@craig-wood.com wrote: ZikO ze...@op.pl wrote: I am a C++ programmer and I am thinking of learning something else because I know second language might be very helpful somehow. I have heard a few positive things about Python but I have never writen

Re: speeding up reading files (possibly with cython)

2009-03-09 Thread S Arrowsmith
Carl Banks pavlovevide...@gmail.com wrote: When building a very large structure like you're doing, the cyclic garbage collector can be a bottleneck. Try disabling the cyclic garbage collector before building the large dictionary, and re- enabling it afterwards. import gc gc.disable() try:

error after upgrade

2009-03-09 Thread jonsoons
This script had been running flawlessly for years but it does not like 2.5: mis /u/transfer/bin # ./printchecks AP void Traceback (most recent call last): File ./printchecks, line 5, in module import os, sys, string, tempfile, re File /opt/csw/lib/python2.5/tempfile.py, line 33, in

Re: RichCompare and RichCompareBool

2009-03-09 Thread Mark Dickinson
On Mar 2, 10:33 am, Aaron Brady castiro...@gmail.com wrote: The code for PyObject_RichCompare does not contain this, it doesn't seem.  Is it a bug? It's not a bug. See revision 67204: http://svn.python.org/view?view=revrevision=67204 Mark --

Re: RichCompare and RichCompareBool

2009-03-09 Thread Aaron Brady
On Mar 9, 10:11 am, Mark Dickinson dicki...@gmail.com wrote: On Mar 2, 10:33 am, Aaron Brady castiro...@gmail.com wrote: The code for PyObject_RichCompare does not contain this, it doesn't seem.  Is it a bug? It's not a bug.  See revision 67204:

Re: Candidate for a new itertool

2009-03-09 Thread pruebauno
On Mar 7, 8:47 pm, Raymond Hettinger pyt...@rcn.com wrote: The existing groupby() itertool works great when every element in a group has the same key, but it is not so handy when groups are determined by boundary conditions. For edge-triggered events, we need to convert a boundary-event

Re: This should be a simple question...

2009-03-09 Thread Tim Chase
Steven D'Aprano wrote: Tim Chase wrote: If the constants don't actually share any conceptual commonality, then SteveH is right, that they really should just be globals. Surely that's backwards? If the constants don't share any conceptual commonality, they should be kept independent in the

A better way to timeout a class method?

2009-03-09 Thread John O'Hagan
Is there a concise Pythonic way to write a method with a timeout? I did this: class Eg(object): def get_value(self, timeout): from threading import Timer self.flag = True def flag_off(): self.flag = False timer = Timer(timeout, flag_off)

Re: A parser for S.W.I.F.T. MT940 Files (for banking transactions)

2009-03-09 Thread Mustafa Sakalsiz
I can wait for a month. I can also provide test data, but I am not sure if their sizes are big enough for you. If you mention your expectation for test data sizes, I will try to find them. Saki On Mon, Mar 9, 2009 at 5:06 PM, andrew cooke and...@acooke.org wrote: Saki wrote: Hello, I

Re: Any c header parser for generate ctypes module?

2009-03-09 Thread Nick Craig-Wood
Diez B. Roggisch de...@nospam.web.de wrote: Victor Lin wrote: I am writing python binding for some c library. It is really a super boring job. Copy... paste... modify.. copy paste...modify I am wondering, I am a programmer, why I can't do this job like a programmer? So I think the

Re: a potential pep to extend the syntax of for loops

2009-03-09 Thread Gabriel Genellina
En Mon, 09 Mar 2009 07:15:30 -0200, pang pablo.ang...@uam.es escribió: This is an idea about something I'd like to see implemented in python. The python-ideas list exists to discuss this sort of things. The syntax of a for loop is restricted to the following: for element in list:

Re: A Dangling Tk Entry

2009-03-09 Thread Marc 'BlackJack' Rintsch
On Mon, 09 Mar 2009 04:22:57 -0700, W. eWatson wrote: Marc 'BlackJack' Rintsch wrote: On Sun, 08 Mar 2009 22:20:09 -0700, W. eWatson wrote: You didn't answer my question why entry is necessary at all. The original author thought it was necessary to return entry. I'll give you a peek at a

xml input sanitizing method in standard lib?

2009-03-09 Thread Petr Muller
Hi, Is there some method provided in python standard library to sanitize strings used as input to xml documents? (=remove form-feeds and whatever else). I've searched docs and google, found only 4Suite project. I cannot rely on something not in standard lib, so I'm wondering if I've just

Re: RichCompare and RichCompareBool

2009-03-09 Thread Mark Dickinson
On Mar 9, 3:22 pm, Aaron Brady castiro...@gmail.com wrote: My complaint was that the docs for the function, as well as its name, are misleading.  RichCompareBool should not take the short cut, and x in [x] should call something else that does.  (I am not arguing against the decided behavior of

Re: /a is not /a ?

2009-03-09 Thread Carl Banks
On Mar 8, 5:32 am, Lie Ryan lie.1...@gmail.com wrote: Mel wrote:  wrote: Steven D'Aprano st...@pearwood.info writes: It is never correct to avoid using is when you need to compare for identity. When is it ever necessary to compare for identity? Ho-hum.  MUDD game. def broadcast

Re: xml input sanitizing method in standard lib?

2009-03-09 Thread Gabriel Genellina
En Mon, 09 Mar 2009 13:32:48 -0200, Petr Muller a...@afri.cz escribió: Is there some method provided in python standard library to sanitize strings used as input to xml documents? (=remove form-feeds and whatever else). I've searched docs and google, found only 4Suite project. I cannot rely on

Re: RichCompare and RichCompareBool

2009-03-09 Thread Aaron Brady
On Mar 9, 10:42 am, Mark Dickinson dicki...@gmail.com wrote: On Mar 9, 3:22 pm, Aaron Brady castiro...@gmail.com wrote: My complaint was that the docs for the function, as well as its name, are misleading.  RichCompareBool should not take the short cut, and x in [x] should call something

Mapping 64 bit int from C to Python-2.2

2009-03-09 Thread Explore_Imagination
Hi I want to map 64 bit integers from C to python. I must use Python 2.2 BUT There is no support for 64 bits integers in Python2.2 (Supported in 2.5). Now the problem is that I have these four variables: unit32_t a,b,c; uint64_t w,x,y,z; I use this funtion to map values: Py_BuildValue(

Re: A better way to timeout a class method?

2009-03-09 Thread Marco Mariani
John O'Hagan wrote: Is there a concise Pythonic way to write a method with a timeout? No need for threading. Just define a signal handler and call signal.alarm(). See the example at the end of the page: http://docs.python.org/library/signal.html --

Importer / module loader for filelike objects produces ugly stacktraces

2009-03-09 Thread Nebur
I've made an importer (experimental status) to load python modules from archives, especially from AES encrypted ones. ( http://sourceforge.net/projects/py-archimporter ) I've followed the PEP 302 recipe (http://www.python.org/dev/peps/ pep-0302/). The loader does set each modules __file__

Re: error after upgrade

2009-03-09 Thread Richard Brodie
jonsoons jonso...@gmail.com wrote in message news:3102ef22-b5e6-466d-a3f3-8648ccb5a...@p11g2000yqe.googlegroups.com... from binascii import hexlify as _hexlify ImportError: ld.so.1: python: fatal: relocation error: file /opt/csw/ lib/libpython2.5.so.1.0: symbol libintl_gettext: referenced

Re: Is python worth learning as a second language?

2009-03-09 Thread Tim Rowe
2009/3/9 ZikO ze...@op.pl: Do you think python would be good complementary language for C++? Do you think it's worth learning it or let's say try Java? and how difficult it would be for me if I know C++ pretty well I would say? We're not exactly impartial advisors in here ;-) I reckon Python

Re: A parser for S.W.I.F.T. MT940 Files (for banking transactions)

2009-03-09 Thread andrew cooke
a month is more than enough - i would expect to have something in a week. if possible, a data size of 1GB or more would be useful, but otherwise the largest file you have. i will use http://srd.tcg-net.com/Documentation/MT940/MT9402GB.htm as an initial guide. please remember that this is a

Re: A parser for S.W.I.F.T. MT940 Files (for banking transactions)

2009-03-09 Thread andrew cooke
one other thing - LEPL *only* works with Python 2.6 and 3.0. it WILL NOT work with Python 2.5. if this is an issue then it is not a suitable solution (it is not possible to back-port the library). andrew andrew cooke wrote: a month is more than enough - i would expect to have something in

Re: Is python worth learning as a second language?

2009-03-09 Thread David Cournapeau
On Mon, Mar 9, 2009 at 11:33 PM, grocery_stocker cdal...@gmail.com wrote: On Mar 9, 5:30 am, Nick Craig-Wood n...@craig-wood.com wrote: Go here  http://www.diveintopython.org/ Download the PDF or buy the book. What about the stuff on docs.python.org? Isn't that information just as

Re: 2.6.1 - simple division

2009-03-09 Thread Mohammad Tayseer
j = .8 j 0.80004 Python follows the IEEE-754 standard, which doesn't represent the numbers exactly. See http://en.wikipedia.org/wiki/IEEE_754 Mohammad Tayseer http://spellcoder.com/blogs/tayseer From: farsi...@gmail.com farsi...@gmail.com

Re: Python alternatives to Text::SimpleTable?

2009-03-09 Thread Alan G Isaac
http://code.google.com/p/econpy/source/browse/trunk/utilities/text.py -- http://mail.python.org/mailman/listinfo/python-list

Re: error after upgrade

2009-03-09 Thread jonsoons
On Mar 9, 12:00 pm, Richard Brodie r.bro...@rl.ac.uk wrote: jonsoons jonso...@gmail.com wrote in message news:3102ef22-b5e6-466d-a3f3-8648ccb5a...@p11g2000yqe.googlegroups.com...    from binascii import hexlify as _hexlify ImportError: ld.so.1: python: fatal:relocationerror:file/opt/csw/

Re: Set Frozenset?

2009-03-09 Thread Alan G Isaac
Hans Larsen schrieb: How could I take an elemment from a set or a frozenset On 3/8/2009 2:06 PM Diez B. Roggisch apparently wrote: You iterate over them. If you only want one value, use iter(the_set).next() I recall a claim that for result in myset: break is the most

Re: Mapping 64 bit int from C to Python-2.2

2009-03-09 Thread MRAB
Explore_Imagination wrote: Hi I want to map 64 bit integers from C to python. I must use Python 2.2 BUT There is no support for 64 bits integers in Python2.2 (Supported in 2.5). Now the problem is that I have these four variables: unit32_t a,b,c; uint64_t w,x,y,z; I use this funtion to map

Re: /a is not /a ?

2009-03-09 Thread Robert Kern
On 2009-03-08 12:39, Mark Dickinson wrote: On Mar 7, 2:14 pm, Christian Heimesli...@cheimes.de wrote: Steven D'Aprano wrote: Yes. Floating point NANs are required to compare unequal to all floats, including themselves. It's part of the IEEE standard. As far as I remember that's not correct.

Re: Packaging Survey

2009-03-09 Thread Werner F. Bruhin
Tarek Ziadé wrote: The Python Langage Summit is coming up. To prepare this event, I have put online a survey you can take to tell us a bit more about you and how you package your Python applications. * Who should take the survey : any Python developer that packages and distributes his code,

Re: xml input sanitizing method in standard lib?

2009-03-09 Thread Petr Muller
Hi, Is there some method provided in python standard library to sanitize strings used as input to xml documents? (=remove form-feeds and whatever else). I've searched docs and google, found only 4Suite project. I cannot rely on something not in standard lib, so I'm wondering if I've

Re: Set Frozenset?

2009-03-09 Thread Matt Nordhoff
Alan G Isaac wrote: Hans Larsen schrieb: How could I take an elemment from a set or a frozenset On 3/8/2009 2:06 PM Diez B. Roggisch apparently wrote: You iterate over them. If you only want one value, use iter(the_set).next() I recall a claim that for result in

  1   2   3   >