execnet-1.0.7: new env-setting and keyboardinterrupt fixes

2010-07-08 Thread holger krekel
execnet-1.0.7 is a backward compatible release avoiding a gateway termination race condition and adding the possibility to add env:NAME=value settings to gateway specifications, thanks to thanks Jakub Gustak. execnet is a small and stable pure-python library for automatically deploying and

ANN: ActivePython 2.7.0.1 is now available

2010-07-08 Thread Sridhar Ratnakumar
We are pleased to announce the availability of ActivePython 2.7.0.1. http://www.activestate.com/activepython This release corresponds to the recently released Python 2.7, and, like ActivePython 2.6, includes the Python Package Manager (PyPM) with essential packages such as Distribute (a

Re: The real problem with Python 3 - no business case for conversion (was I strongly dislike Python 3)

2010-07-08 Thread Martin v. Loewis
I just couldn't get through on the python-dev list that I couldn't just upgrade my code to 2.6 and then use 2to3 to keep in step across the 2-3 chasm, as this would leave behind my faithful pre-2.6 users. Not sure whom you had been talking to. But I would have tried to explain that you don't

Re: How do I add method dynamically to module using C API?

2010-07-08 Thread Alf P. Steinbach /Usenet
* Martin v. Loewis, on 08.07.2010 07:23: And since things work for a single method when I declare 'def' as 'static', I suspect that means that the function object created by PyCFunction_NewEx holds on to a pointer to the PyMethodDef structure? Correct; it doesn't make a copy of the struct. So

Appending to a file using Python API

2010-07-08 Thread lavanya
Hello all, How do you append to a file using Python os::file APIs. So that it appends to the content of the file. Not adding the content to the new line. But just appends next to the exiting content of the file. Example : current content of file A B C if we append D to it, it should be A B C D

Re: C interpreter in Lisp/scheme/python

2010-07-08 Thread Nick Keighley
On 7 July, 17:38, Rivka Miller rivkaumil...@gmail.com wrote: Although C comes with a regex library, C does not come with a regexp library Anyone know what the first initial of L. Peter Deutsch stand for ? Laurence according to wikipedia (search time 2s) --

Re: C interpreter in Lisp/scheme/python

2010-07-08 Thread Nick Keighley
On 8 July, 08:08, Nick Keighley nick_keighley_nos...@hotmail.com wrote: On 7 July, 17:38, Rivka Miller rivkaumil...@gmail.com wrote: Anyone know what the first initial of L. Peter Deutsch stand for ? Laurence according to wikipedia (search time 2s) oops! He was born Laurence but changed it

Re: Appending to a file using Python API

2010-07-08 Thread Steven D'Aprano
On Wed, 07 Jul 2010 23:55:46 -0700, lavanya wrote: Hello all, How do you append to a file using Python os::file APIs. So that it appends to the content of the file. Not adding the content to the new line. But just appends next to the exiting content of the file. Example : current content

Re: How do I add method dynamically to module using C API?

2010-07-08 Thread Martin v. Loewis
I tried (1) adding a __del__, but no dice, I guess because it wasn't really an object method but just a free function in a module; and (2) the m_free callback in the module definition structure, but it was not called. m_free will be called if the module object gets deallocated. So if m_free

Re: Python -- floating point arithmetic

2010-07-08 Thread Steven D'Aprano
On Thu, 08 Jul 2010 06:04:33 +0200, David Cournapeau wrote: On Thu, Jul 8, 2010 at 5:41 AM, Zooko O'Whielacronx zo...@zooko.com wrote: I'm starting to think that one should use Decimals by default and reserve floats for special cases. This is somewhat analogous to the way that Python

Re: The real problem with Python 3 - no business case for conversion

2010-07-08 Thread Ben Finney
Martin v. Loewis mar...@v.loewis.de writes: The point, one more time with feeling, is that the incompatibilities between 2.x and 3.x will *increase* over time. I think this is unfounded, and actually false. Since many other people have responded with similar sentiments, I can only think I

Re: The real problem with Python 3 - no business case for conversion (was I strongly dislike Python 3)

2010-07-08 Thread Steven D'Aprano
On Wed, 07 Jul 2010 14:10:57 -0700, Brendan Abel wrote: The entire fact that 3.x was *designed* to be incompatible should tell you that supporting 2.x and 3.x with a single code base is a bad idea, except for the very smallest of projects. I don't see that follows at all. If the

Re: Python 2.7 released

2010-07-08 Thread Tim Golden
On 08/07/2010 03:17, imageguy wrote: I, too, have multiple versions installed -- newer ones for running code I haven't upgraded; older ones for compatibility testing where needed. I just install to the default c:\pythonxy directories (although I like the idea of a common root) and I put NTFS

simple python deployment tool

2010-07-08 Thread King
Hi, I am writing a python package deployment tool for linux based platforms. I have tried various existing tool sets but none of them is up to the mark and they have their own issues. Initially I'll start with simple approach. 1. Find all the modules/packages and copy to lib directory. 2. Find

Re: The real problem with Python 3 - no business case for conversion (was I strongly dislike Python 3)

2010-07-08 Thread Giampaolo Rodolà
2010/7/8 Michele Simionato michele.simion...@gmail.com: On Jul 7, 10:55 pm, Carl Banks pavlovevide...@gmail.com wrote: On Jul 7, 1:31 am, Paul McGuire pt...@austin.rr.com wrote: I just couldn't get through on the python-dev list that I couldn't just upgrade my code to 2.6 and then use 2to3

Re: C interpreter in Lisp/scheme/python

2010-07-08 Thread Pascal J. Bourguignon
Nick Keighley nick_keighley_nos...@hotmail.com writes: On 8 July, 08:08, Nick Keighley nick_keighley_nos...@hotmail.com wrote: On 7 July, 17:38, Rivka Miller rivkaumil...@gmail.com wrote: Anyone know what the first initial of L. Peter Deutsch stand for ? Laurence according to wikipedia

Re: How do I add method dynamically to module using C API?

2010-07-08 Thread Alf P. Steinbach /Usenet
* Martin v. Loewis, on 08.07.2010 09:13: I tried (1) adding a __del__, but no dice, I guess because it wasn't really an object method but just a free function in a module; and (2) the m_free callback in the module definition structure, but it was not called. m_free will be called if the module

Re: delegation pattern via descriptor

2010-07-08 Thread Bruno Desthuilliers
kedra marbun a écrit : On Jul 7, 2:46 am, Bruno Desthuilliers bdesth.quelquech...@free.quelquepart.fr wrote: Gregory Ewing a écrit : Bruno Desthuilliers wrote: kedra marbun a écrit : if we limit our discussion to py: why __{get|set|delete}__ don't receive the 'name' 'class' from

Howto write XML file with comments?

2010-07-08 Thread Alexander Eisenhuth
Hello, - I've to write a XML document including comments - the document should be formatted that it could be viewed with a text editor What is the fastest (time for realization) approach doing it in python 2.5? Any help or hints are very welcome Thanks Alexander --

Re: simple python deployment tool

2010-07-08 Thread Alexander Kapps
King wrote: Hi, I am writing a python package deployment tool for linux based platforms. I have tried various existing tool sets but none of them is up to the mark and they have their own issues. Initially I'll start with simple approach. I'm sorry, but your approach is not going to work. The

Re: Howto write XML file with comments?

2010-07-08 Thread Stefan Behnel
Alexander Eisenhuth, 08.07.2010 11:08: - I've to write a XML document including comments write in the sense of typing in a text editor? Or constructing one programmatically in memory? Or ... ? And what kind of data from what kind of source do you want to put into the document? All of

Re: simple python deployment tool

2010-07-08 Thread King
On Jul 8, 2:21 pm, Alexander Kapps alex.ka...@web.de wrote: King wrote: Hi, I am writing a python package deployment tool for linux based platforms. I have tried various existing tool sets but none of them is up to the mark and they have their own issues. Initially I'll start with

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-08 Thread Christian Heimes
Really? I wasn't entirely aware of this effect of the io module. Somehow, without at all paying attention (because certain third party modules blocking me for awhile, I never looked close enough), I just sort of thought the io module was mostly thin wrappers around stdio primitives, into a

Re: delegation pattern via descriptor

2010-07-08 Thread Gregory Ewing
kedra marbun wrote: i wonder what are the reasons for not passing the class on which the descriptor is attached to, what pattern is encouraged by this? The same answer applies. It's assumed that you will be writing a custom piece of code for each attribute of each class, and giving each one

Re: Howto write XML file with comments?

2010-07-08 Thread Alexander Eisenhuth
Stefan Behnel schrieb: Alexander Eisenhuth, 08.07.2010 11:08: - I've to write a XML document including comments write in the sense of typing in a text editor? Or constructing one programmatically in memory? Or ... ? write means write to a file And what kind of data from what kind of

Re: Howto write XML file with comments?

2010-07-08 Thread Stefan Behnel
Alexander Eisenhuth, 08.07.2010 12:07: Stefan Behnel schrieb: Alexander Eisenhuth, 08.07.2010 11:08: - I've to write a XML document including comments write in the sense of typing in a text editor? Or constructing one programmatically in memory? Or ... ? write means write to a file You

Re: C interpreter in Lisp/scheme/python

2010-07-08 Thread Mark Tarver
On 14 June, 00:07, bolega gnuist...@gmail.com wrote: I am trying to compare LISP/Scheme/Python for their expressiveness. For this, I propose a vanilla C interpreter. I have seen a book which writes C interpreter in C. The criteria would be the small size and high readability of the code.

Re: Python Ireland's pre-PyCon drinks - Wed, 14th July @ Trinity Capital Hotel

2010-07-08 Thread Steve Holden
Vicky Twomey-Lee wrote: Hi All, Join us for drinks and a chat (a warm-up session to PyCon Ireland ;-) ). When: Wed 14th July, from 7pm Where: Trinity Capital Hotel More details at: http://www.python.ie/meetup/2010/python_ireland_meetup_-_july_2010/ Hope you all had a good piss-up!

Re: Howto write XML file with comments?

2010-07-08 Thread Alexander Eisenhuth
Sorry for my little riddle, but you solved it quite good with: - http://effbot.org/zone/element-lib.htm#prettyprint and comments are also in ElementTree (xml.etree.ElementTree.Comment) Thanks Stefan Behnel schrieb: Alexander Eisenhuth, 08.07.2010 12:07: Stefan Behnel schrieb: Alexander

Re: Python -- floating point arithmetic

2010-07-08 Thread Adam Skutt
On Jul 8, 12:53 am, Zooko O'Whielacronx zo...@zooko.com wrote: I don't understand. I described two different problems: problem one is that the inputs, outputs and literals of your program might be in a different encoding (in my experience they have most commonly been in decimal). Problem two

Writing Out from 2 Lists

2010-07-08 Thread Dlanor Slegov
Hi, I am trying to find a python solution for an informatics problem I have at work. Generalized equivalent of my problem is: I have an excel sheet with column 1 and column 2 having corresponding information (much like a dictionary, however with repeating keys). Its like if you read down

Re: simple python deployment tool

2010-07-08 Thread Alexander Kapps
King wrote: On Jul 8, 2:21 pm, Alexander Kapps alex.ka...@web.de wrote: King wrote: Hi, I am writing a python package deployment tool for linux based platforms. I have tried various existing tool sets but none of them is up to the mark and they have their own issues. Initially I'll start with

Re: Python -- floating point arithmetic

2010-07-08 Thread David Mainzer
On 07/07/2010 08:08 PM, Raymond Hettinger wrote: On Jul 7, 5:55 am, Mark Dickinson dicki...@gmail.com wrote: On Jul 7, 1:05 pm, david mainzer d...@tu-clausthal.de wrote: Dear Python-User, today i create some slides about floating point arithmetic. I used an example from

Re: Writing Out from 2 Lists

2010-07-08 Thread Chris Rebert
On Thu, Jul 8, 2010 at 4:30 AM, Dlanor Slegov dlanorsle...@rocketmail.com wrote: Hi, I am trying to find a python solution for an informatics problem I have at work. Generalized equivalent of my problem is: I have an excel sheet with column 1 and column 2 having corresponding information

Re: Argh! Name collision!

2010-07-08 Thread rantingrick
On Jul 7, 6:47 pm, Alf P. Steinbach /Usenet alf.p.steinbach +use...@gmail.com wrote: Hm, for pure shock value I think I'll use the acronym PYthon Native Interface Support. pynis! :-) Well as long as you don't put your pynis *pointers* in pynie then everything will be Ok! ;-) --

Re: Python -- floating point arithmetic

2010-07-08 Thread Adam Skutt
On Jul 8, 7:23 am, Mark Dickinson dicki...@gmail.com wrote: On Jul 8, 11:58 am, Adam Skutt ask...@gmail.com wrote: accurately.  Moreover, in general, it's impossible to even round operations involving transcendental functions to an arbitrary fixed- precision, you may need effectively

Re: Python -- floating point arithmetic

2010-07-08 Thread Ethan Furman
Wolfram Hinderer wrote: On 7 Jul., 19:32, Ethan Furman et...@stoneleaf.us wrote: Nobody wrote: On Wed, 07 Jul 2010 15:08:07 +0200, Thomas Jollans wrote: you should never rely on a floating-point number to have exactly a certain value. Never is an overstatement. There are situations

Re: Is This Open To SQL Injection?

2010-07-08 Thread Victor Subervi
On Wed, Jul 7, 2010 at 2:22 PM, Stephen Hansen me+list/pyt...@ixokai.iowrote: First, its always best to be explicit with insert statements. Meaning, don't rely on the underlining structure of a table, as in: INSERT INTO YourRandomTable VALUES (my, value, here); Instead, do: INSERT INTO

Re: Python -- floating point arithmetic

2010-07-08 Thread Mark Dickinson
On Jul 8, 2:00 pm, Adam Skutt ask...@gmail.com wrote: On Jul 8, 7:23 am, Mark Dickinson dicki...@gmail.com wrote: On Jul 8, 11:58 am, Adam Skutt ask...@gmail.com wrote: accurately.  Moreover, in general, it's impossible to even round operations involving transcendental functions to an

Re: The real problem with Python 3 - no business case for conversion (was I strongly dislike Python 3)

2010-07-08 Thread Philip Semanchuk
On Jul 7, 2010, at 11:26 PM, Terry Reedy wrote: On 7/7/2010 5:29 AM, geremy condra wrote: On Tue, Jul 6, 2010 at 1:37 AM, Terry Reedytjre...@udel.edu wrote: On 7/5/2010 9:00 PM, Philip Semanchuk wrote: On Jul 5, 2010, at 6:41 PM, Chris Rebert wrote: On Mon, Jul 5, 2010 at 3:38 PM, Philip

Debugging a segmentation fault

2010-07-08 Thread dierkerdm...@mail.com
Hi, my python project crashes in a non reproducible way. With gdb I got the backtraces given below. How can I possibly figure out the reason for the segfaults that occur under Linux and Windows, using Python 2.6 in both cases. Thanks Dierk Program received signal SIGSEGV, Segmentation fault.

Re: Storing a callback function as a class member

2010-07-08 Thread Nathan Huesken
Hey, Sorry, I tried to sent only the relevant parts of the example, but the part where the error was, was left out. I defined the function, used as callback like this: class SomeClass: def callback(param): ... So I forgot the self parameter, and therefor the callback had a different

Re: Python -- floating point arithmetic

2010-07-08 Thread Stefan Krah
Adam Skutt ask...@gmail.com wrote: On Jul 8, 7:23 am, Mark Dickinson dicki...@gmail.com wrote: On Jul 8, 11:58 am, Adam Skutt ask...@gmail.com wrote: accurately.  Moreover, in general, it's impossible to even round operations involving transcendental functions to an arbitrary fixed-

Re: Python -- floating point arithmetic

2010-07-08 Thread Adam Skutt
On Jul 8, 9:22 am, Mark Dickinson dicki...@gmail.com wrote: On Jul 8, 2:00 pm, Adam Skutt ask...@gmail.com wrote: On Jul 8, 7:23 am, Mark Dickinson dicki...@gmail.com wrote: On Jul 8, 11:58 am, Adam Skutt ask...@gmail.com wrote: accurately.  Moreover, in general, it's impossible to

Python script to install python

2010-07-08 Thread Vincent Davis
I would like to have a python script that would download the most recent svn of python, configure, make, install and cleanup after itself. I am not replacing the python version I would be using to run the script. I was struggling to get this to work and I assume someone else has done it better.

Issues compiling 2.6.5 on AIX 6.1

2010-07-08 Thread Stopp, Bryan
I've seen other threads on this issue, but the resolution still doesn't seem to exist for me. I'm running the configure script with these parameters: ./configure --prefix=/build/tools \ --exec-prefix=/build/tools \ --enable-shared \ --enable-ipv6 \

Re: Is This Open To SQL Injection?

2010-07-08 Thread Duncan Booth
Ian hobso...@gmaiil.com wrote: On 07/07/2010 19:38, Victor Subervi wrote: Hi; I have this code: sql = 'insert into personalDataKeys values (%s, %s, %s)' % (store, user, ', %s'.join('%s' * len(col_vals)) cursor.execute(sql, col_vals) Is this open to injection attacks? If so,

Re: How to test/troubshoot an extension (pylibconfig)?

2010-07-08 Thread Grant Edwards
On 2010-07-07, Grant Edwards inva...@invalid.invalid wrote: Oops. Those Python bindings are for version 1.3.2 of libconfig (which does work). They don't work with the current version of libconfig. I've stripped the python bindings down to a minimal point, and I've decided there may be a

Re: Python 2.7 released

2010-07-08 Thread Aahz
In article 1450078b-d5ee-437f-bd8b-8da26900f...@x27g2000yqb.googlegroups.com, imageguy imageguy1...@gmail.com wrote: Sorry to be daft here, but what do you mean by a hardlink ? A windows Shortcut ? Just to be clear, a hardlink on NTFS functions almost exactly the same as a hardlink on a Unix

Re: Python 2.7 released

2010-07-08 Thread Grant Edwards
On 2010-07-08, Aahz a...@pythoncraft.com wrote: In article 1450078b-d5ee-437f-bd8b-8da26900f...@x27g2000yqb.googlegroups.com, imageguy imageguy1...@gmail.com wrote: Sorry to be daft here, but what do you mean by a hardlink ? A windows Shortcut ? Just to be clear, a hardlink on NTFS

Re: Python script to install python

2010-07-08 Thread Daniel Fetchinson
I would like to have a python script that would download the most recent svn of python, configure, make, install and cleanup after itself. I am not replacing the python version I would be using to run the script. I was struggling to get this to work and I assume someone else has done it

Re: Is This Open To SQL Injection?

2010-07-08 Thread Stephen Hansen
On 7/8/10 6:20 AM, Victor Subervi wrote: However, I now have another error. Here is my current command: cursor.execute(insert into personalDataKeys (Store, User, useFirstName, useLastName, usePhone, useCell, useFax, useAddress, useShippingAddress, useDOB, useEmail, usePW) values (%s, %s,

Re: Python -- floating point arithmetic

2010-07-08 Thread Victor Eijkhout
Zooko O'Whielacronx zo...@zooko.com wrote: I'm starting to think that one should use Decimals by default and reserve floats for special cases. Only if one has Power6 (or 7) which has hardware support for BCD. Otherwise you will have slow applications. Victor. -- Victor Eijkhout -- eijkhout

Re: Python 2.7 released

2010-07-08 Thread Stephen Hansen
On 7/8/10 8:07 AM, Grant Edwards wrote: On 2010-07-08, Aahz a...@pythoncraft.com wrote: In article 1450078b-d5ee-437f-bd8b-8da26900f...@x27g2000yqb.googlegroups.com, imageguy imageguy1...@gmail.com wrote: Sorry to be daft here, but what do you mean by a hardlink ? A windows Shortcut ?

Re: Python 2.7 released

2010-07-08 Thread Tim Golden
On 08/07/2010 16:07, Grant Edwards wrote: On 2010-07-08, Aahza...@pythoncraft.com wrote: In article1450078b-d5ee-437f-bd8b-8da26900f...@x27g2000yqb.googlegroups.com, imageguyimageguy1...@gmail.com wrote: Sorry to be daft here, but what do you mean by a hardlink ? A windows Shortcut ? Just

Issue with logging.config

2010-07-08 Thread Joe Hughes
Hi Python Help: I'm doing some work with logging.config and I'm running into an interesting situation. I've run this by python-help, but that didn't help so I thought I would send to the list. Here is the config file [loggers] keys=root,log,syslog [handlers] keys=console,log,syslog

Re: Python -- floating point arithmetic

2010-07-08 Thread Mark Dickinson
On Jul 8, 3:29 pm, Adam Skutt ask...@gmail.com wrote: On Jul 8, 9:22 am, Mark Dickinson dicki...@gmail.com wrote: On Jul 8, 2:00 pm, Adam Skutt ask...@gmail.com wrote:  For some computations, the number of bits required to get the desired precision can quickly overwhelm the finite

Re: Python script to install python

2010-07-08 Thread Vincent Davis
On Thu, Jul 8, 2010 at 9:11 AM, Daniel Fetchinson fetchin...@googlemail.com wrote: I would like to have a python script that would download the most recent svn of python, configure, make, install and cleanup after itself. I am not replacing the python version I would be using to run the

Re: Python -- floating point arithmetic

2010-07-08 Thread Giacomo Boffi
Zooko O'Whielacronx zo...@zooko.com writes: I'm starting to think that one should use Decimals by default and reserve floats for special cases. would you kindly lend me your Decimals ruler? i need to measure the sides of the triangle whose area i have to compute --

Re: Is This Open To SQL Injection?

2010-07-08 Thread Victor Subervi
On Thu, Jul 8, 2010 at 10:45 AM, Stephen Hansen me+list/pyt...@ixokai.iowrote: On 7/8/10 6:20 AM, Victor Subervi wrote: However, I now have another error. Here is my current command: cursor.execute(insert into personalDataKeys (Store, User, useFirstName, useLastName, usePhone,

Re: Python -- floating point arithmetic

2010-07-08 Thread Chris Rebert
On Thu, Jul 8, 2010 at 8:52 AM, Giacomo Boffi giacomo.bo...@polimi.it wrote: Zooko O'Whielacronx zo...@zooko.com writes: I'm starting to think that one should use Decimals by default and reserve floats for special cases. would you kindly lend me your Decimals ruler? i need to measure the

Re: Python -- floating point arithmetic

2010-07-08 Thread Zooko O'Whielacronx
On Thu, Jul 8, 2010 at 4:58 AM, Adam Skutt ask...@gmail.com wrote: I can't think of any program I've ever written where the inputs are actually intended to be decimal.  Consider a simple video editing program, and the user specifies a frame rate 23.976 fps.  Is that what they really wanted?  

Re: Is This Open To SQL Injection?

2010-07-08 Thread John Nagle
On 7/7/2010 11:52 AM, Stephen Hansen wrote: On 7/7/10 11:38 AM, Victor Subervi wrote: Hi; I have this code: sql = 'insert into personalDataKeys values (%s, %s, %s)' % (store, user, ', %s'.join('%s' * len(col_vals)) cursor.execute(sql, col_vals) Bad approach. Don't put actual data

How is Unladen Swallow coming along?

2010-07-08 Thread John Nagle
How is Unladen Swallow coming along? Looking at the site, code is being checked in and issues are being reported, but the last quarterly release was 2009 Q3. They missed their January 2010 release date for 2009 Q4, so they're now about 6 months behind their project plan.

Re: Is This Open To SQL Injection?

2010-07-08 Thread Stephen Hansen
On 7/8/10 9:03 AM, Victor Subervi wrote: mysql describe products Store; +---+-+--+-+-+---+ | Field | Type| Null | Key | Default | Extra | +---+-+--+-+-+---+ | Store | varchar(40) | NO | MUL | NULL| |

Re: Issues compiling 2.6.5 on AIX 6.1

2010-07-08 Thread Thomas Jollans
On 07/08/2010 04:36 PM, Stopp, Bryan wrote: I’ve seen other threads on this issue, but the resolution still doesn’t seem to exist for me. I’m running the configure script with these parameters: ./configure --prefix=/build/tools \ --exec-prefix=/build/tools \

Re: Is This Open To SQL Injection?

2010-07-08 Thread Stephen Hansen
On 7/7/10 11:52 AM, Stephen Hansen wrote: On 7/7/10 11:38 AM, Victor Subervi wrote: Hi; I have this code: sql = 'insert into personalDataKeys values (%s, %s, %s)' % (store, user, ', %s'.join('%s' * len(col_vals)) cursor.execute(sql, col_vals) First, its always best to be explicit

Re: Debugging a segmentation fault

2010-07-08 Thread Paul Rubin
dierkerdm...@mail.com dierkerdm...@mail.com writes: my python project crashes in a non reproducible way. With gdb I got the backtraces given below. How can I possibly figure out the reason for the segfaults that occur under Linux and Windows, using Python 2.6 in both cases. It's a big C

Re: Python -- floating point arithmetic

2010-07-08 Thread Adam Skutt
On Jul 8, 11:36 am, Mark Dickinson dicki...@gmail.com wrote: I think that's because we're talking at cross-purposes. To clarify, suppose you want to compute some value (pi;  log(2); AGM(1, sqrt(2)); whatever...) to 1000 significant decimal places. Then typically the algorithm (sometimes known

Re: Python -- floating point arithmetic

2010-07-08 Thread Mark Dickinson
On Jul 8, 2:59 pm, Stefan Krah stefan-use...@bytereef.org wrote: pow() is trickier. Exact results have to be weeded out before attempting the correction loop for correct rounding, and this is complicated. For example, in decimal this expression takes a long time (in cdecimal the power

Re: Python -- floating point arithmetic

2010-07-08 Thread Adam Skutt
On Jul 8, 12:38 pm, Zooko O'Whielacronx zo...@zooko.com wrote: On Thu, Jul 8, 2010 at 4:58 AM, Adam Skutt ask...@gmail.com wrote: I can't think of any program I've ever written where the inputs are actually intended to be decimal.  Consider a simple video editing program, and the user

Re: How to test/troubshoot an extension (pylibconfig)?

2010-07-08 Thread Grant Edwards
On 2010-07-08, Grant Edwards inva...@invalid.invalid wrote: On 2010-07-07, Grant Edwards inva...@invalid.invalid wrote: Oops. Those Python bindings are for version 1.3.2 of libconfig (which does work). They don't work with the current version of libconfig. Python 2.6.5 (release26-maint,

ANN: ActivePython 2.6.5.14 is now available

2010-07-08 Thread Sridhar Ratnakumar
We are pleased to announce the availability of ActivePython 2.6.5.14. http://www.activestate.com/activepython This is a minor release with several bug fixes. As usual, it includes an updated Python Package Manager (PyPM) with updates to essential packages such as Distribute (a compatible

Re: Debugging a segmentation fault

2010-07-08 Thread Christian Heimes
my python project crashes in a non reproducible way. With gdb I got the backtraces given below. How can I possibly figure out the reason for the segfaults that occur under Linux and Windows, using Python 2.6 in both cases. One of your third party C extension has a reference count bug. It

Call for Applications - PSF Sponsored Sprints

2010-07-08 Thread Jesse Noller
The PSF is happy to open our first call for applications for sprint funding! Have you ever had a group of people together to hack towards a common goal? You've hosted a sprint! Have you ever wanted to get a group of like minded Pythonistas together to hack for a day? You're going to want to hold

Re: Is This Open To SQL Injection?

2010-07-08 Thread Victor Subervi
I've come to the realization that I don't need FKs at all here. Essentially, what I need to do is consult personalDataKeys simply to determine what data should be loaded into and retrieved from personalData. I was mistaken because the data are not interdependent, it only appeared that way

pySimpleSessions - PHP sessions implemented in Python

2010-07-08 Thread christian schulze
Hey, since there is no standalone sessions module for python (at least a properly working one), I created one and thought i'd share it with you. This is the project: http://code.google.com/p/pysimplesessions/ This is the introduction: http://code.google.com/p/pysimplesessions/wiki/Introduction

Re: Python -- floating point arithmetic

2010-07-08 Thread Stefan Krah
Adam Skutt ask...@gmail.com wrote: I actually agree with much of what you've said.  It was just the impossible claim that went over the top (IMO).  The MPFR library amply demonstrates that computing many transcendental functions to arbitrary precision, with correctly rounded results, is

RE: Issues compiling 2.6.5 on AIX 6.1

2010-07-08 Thread Stopp, Bryan
These are good points, but I've fixed the configure config.guess on about 10 other OSS projects that I needed to compile on this machine. So I know that my changes are correct. The changes boil down to: There are a number of lines in the files that reference AIX versions for configuring details

Re: Python -- floating point arithmetic

2010-07-08 Thread Stefan Krah
Mark Dickinson dicki...@gmail.com wrote: On Jul 8, 2:59 pm, Stefan Krah stefan-use...@bytereef.org wrote: pow() is trickier. Exact results have to be weeded out before attempting the correction loop for correct rounding, and this is complicated. For example, in decimal this expression

RE: Issues compiling 2.6.5 on AIX 6.1

2010-07-08 Thread Stopp, Bryan
I just wanted to follow up my previous email: I tried compiling 2.7 (without editing any config.guess or configure files as they are up to date for AIX6) and it failed with the exact same errors. So I'm still stuck and not sure what I should to do get this to compile. Any other ideas out there?

Re: Lua is faster than Fortran???

2010-07-08 Thread Luis M . González
On Jul 4, 5:58 pm, John Nagle na...@animats.com wrote:     TheUnladenSwallowpeople should in theory be able to reach that level of performance.  (Both groups are employed at Google. So their effectiveness will be compared.)                                 John Nagle No. Collin Winter said

Re: Python -- floating point arithmetic

2010-07-08 Thread Zooko O'Whielacronx
On Thu, Jul 8, 2010 at 11:22 AM, Adam Skutt ask...@gmail.com wrote: On Jul 8, 12:38 pm, Zooko O'Whielacronx zo...@zooko.com wrote: Now as a programmer you have two choices: … 1. accept what they typed in and losslessly store it in a decimal: … 2. accept what they typed in and lossily convert

Python Multi-Channel Audio

2010-07-08 Thread Alex Karpinski
I'm looking for some module or system of modules that can help me do a few things with audio 1. Playback of files (at least .wavs, other codecs would be nice but, hey, converting to a wav is easy) 2. Seek within the file 3. Control volume 3. Do all of these things by channel, e.g. play sound

Re: How is Unladen Swallow coming along?

2010-07-08 Thread Luis M . González
On Jul 8, 1:42 pm, John Nagle na...@animats.com wrote:     How is Unladen Swallow coming along?  Looking at the site, code is being checked in and issues are being reported, but the last quarterly release was 2009 Q3.  They missed their January 2010 release date for 2009 Q4, so they're now

Re: Python -- floating point arithmetic

2010-07-08 Thread Adam Skutt
On Jul 8, 2:00 pm, Stefan Krah stefan-use...@bytereef.org wrote: This whole argument is a misunderstanding. Mark and I argue that correct rounding is quite feasible in practice, you argue that you want guaranteed execution times and memory usage. This is clear now, but was not so apparent in

Question about odd code in libconfig bindings

2010-07-08 Thread Grant Edwards
I'm playign with Python bindings for libconfig, and one of the methods does something that seems very odd to me. The purpose of the method is to fetch the value found a a particular path within the configuration namespace. If the path exists and has a scalar value the method returns the tuple

is not operator?

2010-07-08 Thread sturlamolden
What happens here? Does Python (2.6.5) have an is not operator? a = 5 print (a is not False) True print (a is (not False)) False print (not (a is False)) True It seems y is not x fits well with spoken English, but it is also a bit surprising that y is not x does not mean y is (not x) but not

Re: Lua is faster than Fortran???

2010-07-08 Thread sturlamolden
On 4 Jul, 21:59, Stefan Behnel stefan...@behnel.de wrote: I have already said I don't care about unladen swallow. What I meant, was: which of these benchmarks would have to be better to make you care? Because your decision not to care seems to be based on exactly these benchmarks. Those

Re: is not operator?

2010-07-08 Thread Robert Kern
On 7/8/10 4:10 PM, sturlamolden wrote: What happens here? Does Python (2.6.5) have an is not operator? Yes. From Grammar/Grammar: comp_op: ''|''|'=='|'='|'='|''|'!='|'in'|'not' 'in'|'is'|'is' 'not' -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma

Re: is not operator?

2010-07-08 Thread John Krukoff
On Thu, 2010-07-08 at 13:10 -0700, sturlamolden wrote: What happens here? Does Python (2.6.5) have an is not operator? a = 5 print (a is not False) True print (a is (not False)) False print (not (a is False)) True It seems y is not x fits well with spoken English, but it is also a

Re: is not operator?

2010-07-08 Thread sturlamolden
On 8 Jul, 22:32, Robert Kern robert.k...@gmail.com wrote: What happens here? Does Python (2.6.5) have an is not operator? Yes. From Grammar/Grammar: comp_op: ''|''|'=='|'='|'='|''|'!='|'in'|'not' 'in'|'is'|'is' 'not' Thanks :) -- http://mail.python.org/mailman/listinfo/python-list

Re: How is Unladen Swallow coming along?

2010-07-08 Thread John Nagle
On 7/8/2010 12:19 PM, Luis M. González wrote: On Jul 8, 1:42 pm, John Naglena...@animats.com wrote: How is Unladen Swallow coming along? Looking at the site, code is being checked in and issues are being reported, but the last quarterly release was 2009 Q3. They missed their January

Re: is not operator?

2010-07-08 Thread sturlamolden
On 8 Jul, 22:29, John Krukoff jkruk...@ltgc.com wrote: Don't forget about the similar not in, as in: I noticed that in the grammar Robert posted. It never occurred to me as being a special operator too, but it is. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python -- floating point arithmetic

2010-07-08 Thread Wolfram Hinderer
On 8 Jul., 15:10, Ethan Furman et...@stoneleaf.us wrote: Interesting.  I knew when I posted my above comment that I was ignoring such situations.  I cannot comment on the code itself as I am unaware of the algorithm, and haven't studied numbers extensively (although I do find them very

object exported through manager from multiprocess module

2010-07-08 Thread Tomas Pelka
Hi all, have troubles with exporting objects through managers from multiprocess module, see example: Worker.py: ### from multiprocessing import Process from multiprocessing.managers import BaseManager import pcapy from impacket.ImpactDecoder import EthDecoder

Re: Python Multi-Channel Audio

2010-07-08 Thread Thomas Jollans
On 07/08/2010 09:17 PM, Alex Karpinski wrote: I'm looking for some module or system of modules that can help me do a few things with audio 1. Playback of files (at least .wavs, other codecs would be nice but, hey, converting to a wav is easy) 2. Seek within the file 3. Control volume 3.

ANN: winreg_unicode 0.5.0

2010-07-08 Thread Daniel Stutzbach
I'm pleased to announce the release of winreg_unicode 0.5.0, the first release of winreg_unicode. The winreg_unicode package aims to be a drop-in replacement for Python 2's _winreg module. However, it returns unicode values where possible, similar to Python 3's winreg module. To illustrate the

Re: C interpreter in Lisp/scheme/python

2010-07-08 Thread George Neuner
On Thu, 08 Jul 2010 10:39:45 +0200, p...@informatimago.com (Pascal J. Bourguignon) wrote: Nick Keighley nick_keighley_nos...@hotmail.com writes: Nick Keighley nick_keighley_nos...@hotmail.com wrote: Rivka Miller rivkaumil...@gmail.com wrote: Anyone know what the first initial of L. Peter

Re: Python Multi-Channel Audio

2010-07-08 Thread geremy condra
On Thu, Jul 8, 2010 at 2:11 PM, Thomas Jollans tho...@jollans.com wrote: On 07/08/2010 09:17 PM, Alex Karpinski wrote: I'm looking for some module or system of modules that can help me do a few things with audio 1. Playback of files (at least .wavs, other codecs would be nice but, hey,

  1   2   3   4   >