[RELEASED] Python 3.1.3

2010-11-27 Thread Benjamin Peterson
On behalf of the Python development team, I'm happy as a lark to announce the third bugfix release for the Python 3.1 series, Python 3.1.3. This bug fix release features numerous bug fixes and documentation improvements over 3.1.2. The Python 3.1 version series focuses on the stabilization and op

[RELEASED] Python 2.7.1

2010-11-27 Thread Benjamin Peterson
On behalf of the Python development team, I'm happy as a clam to announce the immediate availability of Python 2.7.1. 2.7 includes many features that were first released in Python 3.1. The faster io module, the new nested with statement syntax, improved float repr, set literals, dictionary views,

earn 200-300% just launched new doubler 15 m ago join fast

2010-11-27 Thread bhanu
http://fast2double.com?bhanusri join 30$ get 5$ line bonus -- http://mail.python.org/mailman/listinfo/python-list

Re: Matlab equivalent syntax in Python

2010-11-27 Thread Akand Islam
On Nov 27, 4:38 pm, Robert Kern wrote: > On 2010-11-26 18:23 , Akand Islam wrote: > > > > > > > > > > > On Nov 26, 3:50 pm, Cameron Simpson  wrote: > >> On 26Nov2010 13:15, Akand Islam  wrote: > >> | Thanks for your posting. Like, here is the following Matlab codes > >> | which I am trying to tran

ANJELINA JOLIE - KATE WINSLET HOT PICTURES AND PROFILES HERE

2010-11-27 Thread cinema
http://www.cinemaulagam.org http://www.cinemaulagam.org http://www.cinemaulagam.org http://www.cinemaulagam.org http://www.cinemaulagam.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Needed: Real-world examples for Python's Cooperative Multiple Inheritance

2010-11-27 Thread Steve Holden
On 11/27/2010 4:34 PM, Steven D'Aprano wrote: [...] > The problem isn't writing documentation for the feature, but coming up > with real-world use-cases. The documentation for super and the MRO is > extensive and detailed. It's also complicated, because multiple > inheritance is complicated. But

Re: Comparing floats

2010-11-27 Thread Steven D'Aprano
On Sat, 27 Nov 2010 22:55:10 +, kj wrote: [...] > Therefore, to implement this multiplication operation I need to have a > way to verify that the float tuples C and D are "equal". That C and D are tuples of floats is irrelevant. The problem boils down to testing floats for equality. It's e

Re: What's wrong with my logging configuration

2010-11-27 Thread Ben Finney
rambius writes: > I found the culprit. Yesterday I added a file called copy.py. It > clashed with the python built-in module copy and caused that nasty > error. You may be glad to know that newer versions of Python can distinguish absolute imports from relative imports, to address this very prob

Re: What's wrong with my logging configuration

2010-11-27 Thread Ben Finney
rambius writes: > On what environment did you try it? I get the same results with both Python 2 and Python 3 on GNU+Linux: = $ python Python 2.6.6 (r266:84292, Oct 9 2010, 13:53:14) […] $ python3 Python 3.1.3rc1 (r313rc1:86453, Nov 14 2010, 05:49:40) […] = > This is so strange. If I

Re: inverse of a matrix with Fraction entries

2010-11-27 Thread Steven D'Aprano
On Sat, 27 Nov 2010 15:44:38 -0800, casevh wrote: > I think most users are expecting infinite precision when they use > rationals. Trying to explain limited precision rational arithmetic might > be interesting. Most users are expecting infinite precision decimals when they use floats, and get su

Re: Comparing floats

2010-11-27 Thread Arnaud Delobelle
Terry Reedy writes: > On 11/27/2010 5:55 PM, kj wrote: > >> Therefore, to implement this multiplication operation I need to >> have a way to verify that the float tuples C and D are "equal". > > I might try the average relative difference: > sum(abs((i-j)/(i+j)) for i,j in zip(C,D))/n # assuming

Re: inverse of a matrix with Fraction entries

2010-11-27 Thread casevh
On Nov 27, 3:08 pm, Steven D'Aprano wrote: > On Fri, 26 Nov 2010 19:21:47 -0800, casevh wrote: > > On Nov 26, 2:11 pm, Steven D'Aprano > +comp.lang.pyt...@pearwood.info> wrote: > >> On Fri, 26 Nov 2010 12:54:12 -0800, John Nagle wrote: > >> > For ordinary number crunching, > >> > rational arithme

Re: What's wrong with my logging configuration

2010-11-27 Thread rambius
Hello, I found the culprit. Yesterday I added a file called copy.py. It clashed with the python built-in module copy and caused that nasty error. Regards Rambius -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparing floats

2010-11-27 Thread Terry Reedy
On 11/27/2010 5:55 PM, kj wrote: Therefore, to implement this multiplication operation I need to have a way to verify that the float tuples C and D are "equal". I might try the average relative difference: sum(abs((i-j)/(i+j)) for i,j in zip(C,D))/n # assuming lengths constant Certainly, I w

Re: inverse of a matrix with Fraction entries

2010-11-27 Thread Steven D'Aprano
On Fri, 26 Nov 2010 19:21:47 -0800, casevh wrote: > On Nov 26, 2:11 pm, Steven D'Aprano +comp.lang.pyt...@pearwood.info> wrote: >> On Fri, 26 Nov 2010 12:54:12 -0800, John Nagle wrote: >> > For ordinary number crunching, >> > rational arithmetic is completely inappropriate. >> >> Why? >> >> -- >>

Comparing floats

2010-11-27 Thread kj
I'm defining a class (Spam) of objects that are characterized by three parameters, A, B, C, where A and C are n-tuples of floats and B is an n*n tuple-of-tuples of floats. I'm defining a limited multiplication for these objects, like this: Spam(A, B, C) * Spam(D, E, F) = Spam(A, dot(B, E), F)

Re: Needed: Real-world examples for Python's Cooperative Multiple Inheritance

2010-11-27 Thread Steven D'Aprano
On Fri, 26 Nov 2010 23:24:30 -0800, John Nagle wrote: > On 11/26/2010 4:21 PM, Mark Wooding wrote: [...] >>> @This catches the case where two classed both inherit from, say >>> "threading.thread", each expecting to have a private thread. >> >> Why on earth would anyone do such a bizarre thing? If

Re: Matlab equivalent syntax in Python

2010-11-27 Thread Robert Kern
On 2010-11-26 18:23 , Akand Islam wrote: On Nov 26, 3:50 pm, Cameron Simpson wrote: On 26Nov2010 13:15, Akand Islam wrote: | Thanks for your posting. Like, here is the following Matlab codes | which I am trying to transform into Python. Here you | will find "profile clear, profile on, profile

Re: What's wrong with my logging configuration

2010-11-27 Thread rambius
Hello Ben, On what environment did you try it? On Nov 27, 5:09 pm, Ben Finney wrote: > rambius writes: > > When I run this program the logger statement after 'import optparse' > > does not appear. The first logger statement before optparse does > > appear. Has anyone experienced similar behavio

Re: What's wrong with my logging configuration

2010-11-27 Thread Ben Finney
rambius writes: > When I run this program the logger statement after 'import optparse' > does not appear. The first logger statement before optparse does > appear. Has anyone experienced similar behaviour? I use the same config file (from your first message) and your shorter program, and I see t

Re: What's wrong with my logging configuration

2010-11-27 Thread rambius
Hello, I was able to reproduce the problem with even a smaller program: #!/usr/bin/env python import logging import logging.config logging.config.fileConfig('logging.config') logger = logging.getLogger('test') def main(): logger.fatal('test1') import optparse logger.fatal('test2')

Re: What's wrong with my logging configuration

2010-11-27 Thread rambius
On Nov 27, 4:07 pm, rambius wrote: > Hello, > > I am using python logging and as of today it stopped working. Here is > my program: > I forgot to give my environment: $ uname -a Darwin arielmac.lan 10.5.0 Darwin Kernel Version 10.5.0: Fri Nov 5 23:20:39 PDT 2010; root:xnu-1504.9.17~1/RELEA

What's wrong with my logging configuration

2010-11-27 Thread rambius
Hello, I am using python logging and as of today it stopped working. Here is my program: #!/usr/bin/env python import base64 import getpass import httplib import logging import logging.config import sys import urlparse logging.config.fileConfig('logging.config') logger = logging.getLogger(sys.

Python make fails with error "Fatal Python error: Interpreter not initialized (version mismatch?)"

2010-11-27 Thread Anurag Chourasia
Hi All, During the make step of python, I am encountering a weird error. This is on AIX 5.3 using gcc as the compiler. My configuration options are as follows ./configure --enable-shared --disable-ipv6 --with-gcc=gcc CPPFLAGS="-I /opt/freeware/include -I /opt/freeware/include/readline -I /opt/fr

Re: AIX 5.3 - Enabling Shared Library Support Vs Extensions

2010-11-27 Thread Anurag Chourasia
Hi Stefan, I followed your suggestion and configured LDFLAGS but the make step fails for another error now. My configuration options are as follows ./configure --enable-shared --disable-ipv6 --with-gcc=gcc CPPFLAGS="-I /opt/freeware/include -I /opt/freeware/include/readline -I /opt/freeware/incl

Re: Scheme as a virtual machine?

2010-11-27 Thread Raffael Cavallaro
On 2010-11-25 11:30:12 -0500, Mario S. Mommer said: In the realm of pure logic, ad hominems are logically invalid, period. We don't live in the realm of pure logic (whatever that would mean - pretty sure no human beings exist in the realm of pure logic, so there is no homo hominis to make an

RE: Kind of plugin system

2010-11-27 Thread Marc-Andre Belzile
I guess you could just define an entry-point in your source provider files that would return a specific instance of an InformationProvider class. This entry-point would be called by your main app (maybe at startup time or during an update phase). There are plenty of articles on the web about py

Re: Convert QStingList to Python list

2010-11-27 Thread Peter Chant
Peter Otten wrote: > > Try it out yourself in the interactive interpreter. Here's a sample > session: > Peter, thanks. I've got some way to go with python and have only just started looking at Qt, your help has been very useful. Pete -- http://www.petezilla.co.uk -- http://mail.python.or

Re: inverse of a matrix with Fraction entries

2010-11-27 Thread casevh
On Nov 27, 4:00 am, m...@distorted.org.uk (Mark Wooding) wrote: > casevh writes: > > I coded a quick matrix inversion function and measured running times > > using GMPY2 rational and floating point types. For the floating point > > tests, I used a precision of 1000 bits. With floating point values

Re: Convert QStingList to Python list

2010-11-27 Thread Peter Otten
Peter Chant wrote: > The following code generates a QStringList: > > fileNames = QFileDialog.getOpenFileNames(None,"Chose raw file",".",) > > Printing it: > > print "Files selected "+QStringList(fileNames) You say that fileNames already is a QStringList. Why are you trying to convert it to a

Convert QStingList to Python list

2010-11-27 Thread Peter Chant
The following code generates a QStringList: fileNames = QFileDialog.getOpenFileNames(None,"Chose raw file",".",) Printing it: print "Files selected "+QStringList(fileNames) Results in: TypeError: cannot concatenate 'str' and 'QStringList' objects Any idea how to convert a QStingList into a py

Re: MATLAB to Python?

2010-11-27 Thread Victor Eijkhout
MATLABdude wrote: > Also the > values themselves are not identical compared to the values of the > MATLAB program. In numerical analysis there is no such thing as identical. If they differ by 1.e-10 I'd call it close enough. The difference comes from differing numerical methods. Victor. -- Vic

Re: Using Python for a demonstration in historical linguistics

2010-11-27 Thread Vlastimil Brom
2010/11/27 Dax Bloom : > On Nov 6, 6:41 am, Vlastimil Brom wrote: >> 2010/11/6 Dax Bloom : >> ... >> Rask_Grimm_re = ur"[bdgptk]ʰ?" >> Rask_Grimm_dct = {u"b":u"p", u"bʰ": u"b", u"t": u"þ", } # ... >> >> def repl_fn(m): >>     return Rask_Grimm_dct.get(m.group(), m.group()) >> >> ie_txt = u" bʰrāte

Re: inverse of a matrix with Fraction entries

2010-11-27 Thread Mark Wooding
casevh writes: > I coded a quick matrix inversion function and measured running times > using GMPY2 rational and floating point types. For the floating point > tests, I used a precision of 1000 bits. With floating point values, > the running time grew as n^3. With rational values, the running tim

Re: Needed: Real-world examples for Python's Cooperative Multiple Inheritance

2010-11-27 Thread Mark Wooding
John Nagle writes: > On 11/26/2010 4:21 PM, Mark Wooding wrote: > > John Nagle writes: > >> @This catches the case where two classed both inherit from, say > >> "threading.thread", each expecting to have a private thread. > > > > Why on earth would anyone do such a bizarre thing? If you want a

Re: Kind of plugin system

2010-11-27 Thread Rainer Mansfeld
Am 26.11.2010 18:46, schrieb Gaëtan Podevijn: I need to get some informations from files stored on my filesystem, Flickr and Picasa. So the idea is to create a class (for instance, "InformationsProvider") that provides common methods for those three sources, then, for each source, I create a cla

Re: Newbie question about python garbage collection when keeping only a reference to an object's member

2010-11-27 Thread TuckerTherese
Some specialists tell that http://bestfinance-blog.com";>loan help people to live their own way, because they are able to feel free to buy necessary things. Moreover, various banks offer small business loan for young and old people. -- http://mail.python.org/mailman/listinfo/python-list