[ANN] Python 2.5.5 Release Candidate 2.

2010-01-25 Thread Martin v. Löwis
On behalf of the Python development team and the Python community, I'm happy to announce the release candidate 2 of Python 2.5.5. This is a source-only release that only includes security fixes. The last full bug-fix release of Python 2.5 was Python 2.5.4. Users are encouraged to upgrade to the

[ANN] Pyspread 0.0.14 released

2010-01-25 Thread Martin Manns
Pyspread 0.0.14 released I am pleased to announce the new release 0.0.14 of pyspread. About: -- Pyspread is a cross-platform Python spreadsheet application. It is based on and written in the programming language Python. Instead of spreadsheet formulas, Python

Cape Town Python Users Group meeting - 30/01/2010

2010-01-25 Thread Neil Muller
The next Cape Town Python Users Group meeting will be Sat, 30th January, starting from around 14:00, in the sudo room at the bandwidth barn. See http://python.org.za/pugs/cape-town/MeetingTwentyFour for details. -- Neil Muller -- http://mail.python.org/mailman/listinfo/python-announce-list

ANN: Urwid 0.9.9.1 - Console UI Library

2010-01-25 Thread Ian Ward
Announcing Urwid 0.9.9.1 Urwid home page: http://excess.org/urwid/ Screen shots: http://excess.org/urwid/examples.html Tarball: http://excess.org/urwid/urwid-0.9.9.1.tar.gz About this release: === This maintenance release fixes a number of bugs

TypeError not caught by except statement

2010-01-25 Thread siddu
Hi, except not able to caught the TypeError exception occured in the below code log.info(refer,ret) in the try block throws a TypeError which is not caught . Also sometimes process is getting hanged.

Is defaultdict thread safe?

2010-01-25 Thread Frank Millman
Hi all Is defaultdict thread safe? Assume I have - from collections import defaultdict my_dict = defaultdict(list) If two threads call my_dict['abc'].append(...) simultaneously, is it guaranteed that my_dict['abc'] will end up containing two elements? Thanks Frank Millman --

Re: TypeError not caught by except statement

2010-01-25 Thread Alf P. Steinbach
* siddu: Hi, except not able to caught the TypeError exception occured in the below code log.info(refer,ret) in the try block throws a TypeError which is not caught . Also sometimes process is getting hanged.

Re: Sikuli: the coolest Python project I have yet seen...

2010-01-25 Thread Carl Banks
On Jan 24, 7:18 pm, Ron ursusmaxi...@gmail.com wrote: Sikuli is the coolest Python project I have ever seen in my ten year hobbyist career. An MIT oepn source project, Sikuli uses Python to automate GUI tasks (in any GUI or GUI baed app that runs the JVM) by simply drag and dropping GUI

Re: Is defaultdict thread safe?

2010-01-25 Thread Raymond Hettinger
On Jan 25, 12:59 am, Frank Millman fr...@chagford.com wrote: Hi all Is defaultdict thread safe? Sometimes. It depends on whether an operation has callbacks to pure Python. Assume I have -     from collections import defaultdict     my_dict = defaultdict(list) If two threads call

Re: Sikuli: the coolest Python project I have yet seen...

2010-01-25 Thread Olof Bjarnason
2010/1/25 Ron ursusmaxi...@gmail.com: Sikuli is the coolest Python project I have ever seen in my ten year hobbyist career. An MIT oepn source project, Sikuli uses Python to automate GUI tasks (in any GUI or GUI baed app that runs the JVM) by simply drag and dropping GUI elements into Python

Re: Is defaultdict thread safe?

2010-01-25 Thread Frank Millman
On Jan 25, 11:26 am, Raymond Hettinger pyt...@rcn.com wrote: On Jan 25, 12:59 am, Frank Millman fr...@chagford.com wrote: Hi all Is defaultdict thread safe? Sometimes. It depends on whether an operation has callbacks to pure Python. Assume I have - from collections import

Re: TypeError not caught by except statement

2010-01-25 Thread tec
On 2010-1-25 16:35, siddu wrote: Hi, except not able to caught the TypeError exception occured in the below code log.info(refer,ret) in the try block throws a TypeError which is not caught . Also sometimes process is getting hanged.

Re: TypeError not caught by except statement

2010-01-25 Thread Carl Banks
On Jan 25, 12:35 am, siddu siddhartha.veedal...@gmail.com wrote: Hi, except not able to caught the TypeError exception occured in the below code         log.info(refer,ret) in the try block throws a TypeError which is not caught . Also sometimes process is getting hanged.

[Private Photo Share] Cali Girl- Has sent you private photos.

2010-01-25 Thread carlisdjfriends
I do not want the entire group seeing these photos.Because some may recognize me. Here's the link: http://www.ourlivespace.com/hotgirl/photos.htm Enjoy babe :) -- http://mail.python.org/mailman/listinfo/python-list

reading from pipe

2010-01-25 Thread Richard Lamboj
Hello, is there any solution to catch if a pipe has closed? Maybe the signal modul? For Simulation: #!/usr/bin/env python # -*- coding: utf-8 -*- import sys while True: line = sys.stdin.readline() sys.stdout.write(line) sys.stdout.flush() time cat /tmp/proxy.test |

Re: Is defaultdict thread safe?

2010-01-25 Thread Stefan Behnel
Frank Millman, 25.01.2010 09:59: Is defaultdict thread safe? Assume I have - from collections import defaultdict my_dict = defaultdict(list) If two threads call my_dict['abc'].append(...) simultaneously, is it guaranteed that my_dict['abc'] will end up containing two elements?

Re: reading from pipe

2010-01-25 Thread Lutz Horn
Hi, Richard Lamboj schrieb: is there any solution to catch if a pipe has closed? Maybe the signal modul? Since sys.stdin is a file object, you can use sys.stdin.closed to check if it has been closed. Lutz -- http://mail.python.org/mailman/listinfo/python-list

WxPython upgrade trouble on Ubuntu 8.04

2010-01-25 Thread lada...@my-deja.com
Hello everyone, You know the old saying, in for a penny, in for a pound. Several hours ago I posted this... http://groups.google.com/group/comp.lang.python/msg/0a86e792c674adc8 ...in which I described my desire to acquire Python 2.6 without upgrading my Ubuntu Linux installation from 8.04.

Re: Broken Python 2.6 installation on Ubuntu Linux 8.04

2010-01-25 Thread John Ladasky
On Jan 24, 3:52 pm, Christian Heimes li...@cheimes.de wrote: By the way you mustn't install your own Python with make install, use make altinstall! Your /usr/local/bin/python binary masks the original python command in /usr/bin. You should remove all /usr/local/bin/py* binaries that do not

Re: list.pop(0) vs. collections.dequeue

2010-01-25 Thread Antoine Pitrou
Le Sun, 24 Jan 2010 11:28:53 -0800, Aahz a écrit : Again, your responsibility is to provide a patch and a spectrum of benchmarking tests to prove it. Then you would still have to deal with the objection that extensions use the list internals -- that might be an okay sell given the effort

modbus

2010-01-25 Thread mbpoc mbpoc
Hi all, I started using pymodbus. I am trying to gain pointers as to how the communcation between devices be achieved through modbus. Suggestions on Simulators/ master-slave codes would be of gr8 help Regards -- http://mail.python.org/mailman/listinfo/python-list

Re: Sikuli: the coolest Python project I have yet seen...

2010-01-25 Thread Jean-Michel Pichavant
Ron wrote: Sikuli is the coolest Python project I have ever seen in my ten year hobbyist career. An MIT oepn source project, Sikuli uses Python to automate GUI tasks (in any GUI or GUI baed app that runs the JVM) by simply drag and dropping GUI elements into Python scripts as function arguments.

ANN: Urwid 0.9.9.1 - Console UI Library

2010-01-25 Thread Ian Ward
Announcing Urwid 0.9.9.1 Urwid home page: http://excess.org/urwid/ Screen shots: http://excess.org/urwid/examples.html Tarball: http://excess.org/urwid/urwid-0.9.9.1.tar.gz About this release: === This maintenance release fixes a number of bugs

Re: Sikuli: the coolest Python project I have yet seen...

2010-01-25 Thread Robin Becker
On 25/01/2010 12:27, Jean-Michel Pichavant wrote: Ron wrote: Sikuli is the coolest Python project I have ever seen in my ten year hobbyist career. An MIT oepn source project, Sikuli uses Python to automate GUI tasks (in any GUI or GUI baed app that runs the JVM) by simply drag and dropping GUI

Re: Is python not good enough?

2010-01-25 Thread Albert van der Horst
In article hij24v$e7...@panix5.panix.com, Aahz a...@pythoncraft.com wrote: In article 1b42700d-139a-4653-8669-d4ee2fc48...@r5g2000yqb.googlegroups.com, ikuta liu ikut...@gmail.com wrote: Is python not good enough? for google, enhance python performance is the good way better then choose build Go

Re: Is python not good enough?

2010-01-25 Thread Simon Brunning
2010/1/25 Albert van der Horst alb...@spenarnc.xs4all.nl: If Go was to compete with anything, they would have give it a name that was Googleable. ;-) If they want it Googleable, it will be. ;-) -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: Sikuli: the coolest Python project I have yet seen...

2010-01-25 Thread Virgil Stokes
On 25-Jan-2010 04:18, Ron wrote: Sikuli is the coolest Python project I have ever seen in my ten year hobbyist career. An MIT oepn source project, Sikuli uses Python to automate GUI tasks (in any GUI or GUI baed app that runs the JVM) by simply drag and dropping GUI elements into Python scripts

www.visualstudio2010.learn.net.in

2010-01-25 Thread groups_ads12
www.visualstudio2010.learn.net.in http://www.visualstudio2010.learn.net.in/ visual studio 2010 http://www.visualstudio2010.learn.net.in/videos/index.php?search=visual\ +studio+2010 visual studio 2010 download http://www.visualstudio2010.learn.net.in/videos/index.php?search=visual\

Re: ANN: Urwid 0.9.9.1 - Console UI Library

2010-01-25 Thread Jean-Michel Pichavant
Ian Ward wrote: Announcing Urwid 0.9.9.1 Urwid home page: http://excess.org/urwid/ Screen shots: http://excess.org/urwid/examples.html Tarball: http://excess.org/urwid/urwid-0.9.9.1.tar.gz About this release: === This maintenance release fixes

Re: Sikuli: the coolest Python project I have yet seen...

2010-01-25 Thread Javier Collado
Hello, I think the site is under maintenance. I tried a couple of hours ago and it worked fine. As an alternative, I found that this link also worked: http://www.sikuli.org/ Unfortunately, it seems it's not working right now. Best regards, Javier 2010/1/25 Virgil Stokes v...@it.uu.se: On

Re: WxPython upgrade trouble on Ubuntu 8.04

2010-01-25 Thread Mike Driscoll
On Jan 25, 5:18 am, lada...@my-deja.com lada...@my-deja.com wrote: Hello everyone, You know the old saying, in for a penny, in for a pound. Several hours ago I posted this... http://groups.google.com/group/comp.lang.python/msg/0a86e792c674adc8 ...in which I described my desire to acquire

Re: A simple-to-use sound file writer

2010-01-25 Thread Albert van der Horst
In article hinfjn$8s...@speranza.aioe.org, Mel mwil...@the-wire.com wrote: Alf P. Steinbach wrote: * Steve Holden: It's not clear to me that you can approximate any waveform with a suitable combination of square waves, Oh. It's simple to prove. At least conceptually! :-) Consider first

Re: Sikuli: the coolest Python project I have yet seen...

2010-01-25 Thread Ron
Thew link at MIT does appear to be down right now, but I presume it will come back up. Well, those of you who find it underwhelming are in good company. See the blog post at Lambda the Ultimate http://lambda-the-ultimate.org/node/3783 I was impressed though by the application to notify you when

Re: WxPython upgrade trouble on Ubuntu 8.04

2010-01-25 Thread John Ladasky
Hi Mike, Thanks, I forgot that wxPython-users is distinct from comp.soft- sys.wxwindows. I'll give it a try. -- http://mail.python.org/mailman/listinfo/python-list

Re: medians for degree measurements

2010-01-25 Thread Bas
On Jan 23, 1:09 am, Steve Howell showel...@yahoo.com wrote: [snip problem with angle data wrapping around at 360 degrees] Hi, This problem is trivial to solve if you can assume that you that your data points are measured consecutively and that your boat does not turn by more than 180 degrees

Re: medians for degree measurements

2010-01-25 Thread Robert Kern
On 2010-01-25 10:16 AM, Bas wrote: P.S. Slightly off-topic rant against both numpy and matlab implementation of unwrap: They always assume data is in radians. There is some option to specify the maximum jump size in radians, but to me it would be more useful to specify the interval of a complete

Re: medians for degree measurements

2010-01-25 Thread Bas
On 2010-01-25 10:16 AM, Bas wrote: P.S. Slightly off-topic rant against both numpy and matlab implementation of unwrap: They always assume data is in radians. There is some option to specify the maximum jump size in radians, but to me it would be more useful to specify the interval of

Re: Is python not good enough?

2010-01-25 Thread David Robinow
On Mon, Jan 25, 2010 at 8:57 AM, Simon Brunning si...@brunningonline.net wrote: 2010/1/25 Albert van der Horst alb...@spenarnc.xs4all.nl: If Go was to compete with anything, they would have give it a name that was Googleable. ;-) If they want it Googleable, it will be. ;-)

Re: list.pop(0) vs. collections.dequeue

2010-01-25 Thread Steve Howell
On Jan 24, 11:24 pm, Paul Rubin no.em...@nospam.invalid wrote: Steve Howell showel...@yahoo.com writes: There is nothing wrong with deque, at least as far as I know, if the data strucure actually applies to your use case.  It does not apply to my use case. You haven't explained why deque

Re: medians for degree measurements

2010-01-25 Thread Robert Kern
On 2010-01-25 11:06 AM, Bas wrote: On 2010-01-25 10:16 AM, Bas wrote: P.S. Slightly off-topic rant against both numpy and matlab implementation of unwrap: They always assume data is in radians. There is some option to specify the maximum jump size in radians, but to me it would be more useful

Xah's Edu Corner: Unix Pipe As Functional Language

2010-01-25 Thread Xah Lee
Dear comrades, Hot from the press: • Unix Pipe As Functional Language http://xahlee.org/comp/unix_pipes_and_functional_lang.html plain text version follows: -- Unix Pipe As Functional Language Xah Lee, 2010-01-25 Found the following juicy

Re: list.pop(0) vs. collections.dequeue

2010-01-25 Thread Steve Howell
On Jan 24, 10:07 pm, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Sun, 24 Jan 2010 20:12:11 -0800, Steve Howell wrote: The most ambitious proposal is to fix the memory manager itself to allow the release of memory from the start of the chunk. That's inappropriate given

Re: list.pop(0) vs. collections.dequeue

2010-01-25 Thread Steve Howell
On Jan 25, 9:31 am, Steve Howell showel...@yahoo.com wrote: On Jan 24, 11:24 pm, Paul Rubin no.em...@nospam.invalid wrote: Steve Howell showel...@yahoo.com writes: There is nothing wrong with deque, at least as far as I know, if the data strucure actually applies to your use case.  It

Re: list.pop(0) vs. collections.dequeue

2010-01-25 Thread Steve Howell
On Jan 24, 1:51 pm, Daniel Stutzbach dan...@stutzbachenterprises.com wrote: On Sun, Jan 24, 2010 at 1:53 PM, Steve Howell showel...@yahoo.com wrote: I don't think anybody provided an actual link, but please correct me if I overlooked it. I have to wonder if my messages are all ending up in

Re: medians for degree measurements

2010-01-25 Thread Bas
On 2010-01-25 10:16 AM, Bas wrote: P.S. Slightly off-topic rant against both numpy and matlab implementation of unwrap: They always assume data is in radians. There is some option to specify the maximum jump size in radians, but to me it would be more useful to specify the interval of

Re: medians for degree measurements

2010-01-25 Thread Steve Howell
On Jan 24, 5:26 pm, Robert Kern robert.k...@gmail.com wrote: On 2010-01-23 05:52 , Steven D'Aprano wrote: On Fri, 22 Jan 2010 22:09:54 -0800, Steve Howell wrote: On Jan 22, 5:12 pm, MRABpyt...@mrabarnett.plus.com  wrote: Steve Howell wrote: I just saw the thread for medians, and it

Total maximal size of data

2010-01-25 Thread Alexander Moibenko
I have a simple question to which I could not find an answer. What is the total maximal size of list including size of its elements? I do not like to look into python source. Here is a code example: import struct KB=1024 MB=KB*KB GB=MB*KB buf=[] bs=32*KB n=4*GB/bs print N,n i=0 size=0L while i

Re: Total maximal size of data

2010-01-25 Thread Diez B. Roggisch
Am 25.01.10 20:05, schrieb Alexander Moibenko: I have a simple question to which I could not find an answer. What is the total maximal size of list including size of its elements? I do not like to look into python source. But it would answer that question pretty fast. Because then you'd see

Re: Total maximal size of data

2010-01-25 Thread Diez B. Roggisch
Am 25.01.10 20:05, schrieb Alexander Moibenko: I have a simple question to which I could not find an answer. What is the total maximal size of list including size of its elements? I do not like to look into python source. But it would answer that question pretty fast. Because then you'd see

Re: Sikuli: the coolest Python project I have yet seen...

2010-01-25 Thread Terry Reedy
On 1/25/2010 9:14 AM, Javier Collado wrote: I think the site is under maintenance. I tried a couple of hours ago and it worked fine. As an alternative, I found that this link also worked: http://www.sikuli.org/ This just redirects to the link below http://sikuli.csail.mit.edu/ I also did

Re: list.pop(0) vs. collections.dequeue

2010-01-25 Thread Daniel Stutzbach
On Mon, Jan 25, 2010 at 12:24 PM, Steve Howell showel...@yahoo.com wrote: Hi Daniel, I agree with what Raymond Hettinger says toward the top of the PEP. Blist, while extremely useful, does seem to have to trade off performance of common operations, notably get item, in order to get better

Re: Total maximal size of data

2010-01-25 Thread AlexM
On Jan 25, 1:23 pm, Diez B. Roggisch de...@nospam.web.de wrote: Am 25.01.10 20:05, schrieb Alexander Moibenko: I have a simple question to which I could not find an answer. What is the total maximal size of list including size of its elements? I do not like to look into python source.

Re: start .pyo files with doubleclick on windows

2010-01-25 Thread Gabriel Genellina
En Sun, 24 Jan 2010 19:36:53 -0300, News123 news...@free.fr escribió: Hi Alf, Alf P. Steinbach wrote: * News123: Hi, I'd like to start .pyo files under windows with a double click. C:\ assoc .pyo .pyo=Python.CompiledFile C:\ ftype python.compiledfile python.compiledfile=C:\Program

Re: Default path for files

2010-01-25 Thread Gabriel Genellina
En Sun, 24 Jan 2010 15:04:48 -0300, Günther Dietrich gd_use...@spamfence.net escribió: Rotwang sg...@hotmail.co.uk wrote: Check out http://docs.python.org/library/os.html and the function chdir it is what you are looking for. Thank you. So would adding import os os.chdir(path) to

Re: Total maximal size of data

2010-01-25 Thread Diez B. Roggisch
Am 25.01.10 20:39, schrieb AlexM: On Jan 25, 1:23 pm, Diez B. Roggischde...@nospam.web.de wrote: Am 25.01.10 20:05, schrieb Alexander Moibenko: I have a simple question to which I could not find an answer. What is the total maximal size of list including size of its elements? I do not like

Re: Total maximal size of data

2010-01-25 Thread Terry Reedy
On 1/25/2010 2:05 PM, Alexander Moibenko wrote: I have a simple question to which I could not find an answer. Because it has no finite answer What is the total maximal size of list including size of its elements? In theory, unbounded. In practice, limited by the memory of the interpreter.

Re: Total maximal size of data

2010-01-25 Thread AlexM
On Jan 25, 2:03 pm, Diez B. Roggisch de...@nospam.web.de wrote: Am 25.01.10 20:39, schrieb AlexM: On Jan 25, 1:23 pm, Diez B. Roggischde...@nospam.web.de  wrote: Am 25.01.10 20:05, schrieb Alexander Moibenko: I have a simple question to which I could not find an answer. What is the

Re: Total maximal size of data

2010-01-25 Thread AlexM
On Jan 25, 2:07 pm, Terry Reedy tjre...@udel.edu wrote: On 1/25/2010 2:05 PM, Alexander Moibenko wrote: I have a simple question to which I could not find an answer. Because it has no finite answer What is the total maximal size of list including size of its elements? In theory,

Re: Total maximal size of data

2010-01-25 Thread Alf P. Steinbach
* AlexM: On Jan 25, 2:07 pm, Terry Reedy tjre...@udel.edu wrote: On 1/25/2010 2:05 PM, Alexander Moibenko wrote: I have a simple question to which I could not find an answer. Because it has no finite answer What is the total maximal size of list including size of its elements? In theory,

Re: Total maximal size of data

2010-01-25 Thread Diez B. Roggisch
Am 25.01.10 21:15, schrieb AlexM: On Jan 25, 2:03 pm, Diez B. Roggischde...@nospam.web.de wrote: Am 25.01.10 20:39, schrieb AlexM: On Jan 25, 1:23 pm, Diez B. Roggischde...@nospam.web.dewrote: Am 25.01.10 20:05, schrieb Alexander Moibenko: I have a simple question to which I could

Re: Total maximal size of data

2010-01-25 Thread AlexM
On Jan 25, 2:37 pm, Alf P. Steinbach al...@start.no wrote: * AlexM: On Jan 25, 2:07 pm, Terry Reedy tjre...@udel.edu wrote: On 1/25/2010 2:05 PM, Alexander Moibenko wrote: I have a simple question to which I could not find an answer. Because it has no finite answer What is the

Re: how can i know if a python object have a attribute such as 'attr1'?

2010-01-25 Thread Jan Kaliszewski
24-01-2010, 00:38:29 Terry Reedy tjre...@udel.edu wrote: On 1/23/2010 10:56 AM, Arnaud Delobelle wrote: thinke365thinke...@gmail.com writes: for example, i may define a python class: class A: def sayHello(): print 'hello' a = A() a.attr1 = 'hello' a.attr2 = 'bb' b = A()

Re: Total maximal size of data

2010-01-25 Thread Diez B. Roggisch
Am 25.01.10 21:49, schrieb AlexM: On Jan 25, 2:37 pm, Alf P. Steinbachal...@start.no wrote: * AlexM: On Jan 25, 2:07 pm, Terry Reedytjre...@udel.edu wrote: On 1/25/2010 2:05 PM, Alexander Moibenko wrote: I have a simple question to which I could not find an answer. Because it has no

Re: Terminal application with non-standard print

2010-01-25 Thread Hans Mulder
Grant Edwards wrote: On 2010-01-24, R?mi babedo...@yahoo.fr wrote: I would like to do a Python application that prints data to stdout, but not the common way. I do not want the lines to be printed after each other, but the old lines to be replaced with the new ones, like wget does it for

Re: list.pop(0) vs. collections.dequeue

2010-01-25 Thread Paul Rubin
Steve Howell showel...@yahoo.com writes: These are the reasons I am not using deque: Thanks for these. Now we are getting somewhere. 1) I want to use native lists, so that downstream methods can use them as lists. It sounds like that could be fixed by making the deque API a proper

Re: Total maximal size of data

2010-01-25 Thread AlexM
On Jan 25, 2:42 pm, Diez B. Roggisch de...@nospam.web.de wrote: Am 25.01.10 21:15, schrieb AlexM: On Jan 25, 2:03 pm, Diez B. Roggischde...@nospam.web.de  wrote: Am 25.01.10 20:39, schrieb AlexM: On Jan 25, 1:23 pm, Diez B. Roggischde...@nospam.web.de    wrote: Am 25.01.10 20:05,

Re: Total maximal size of data

2010-01-25 Thread Diez B. Roggisch
Am 25.01.10 22:22, schrieb AlexM: On Jan 25, 2:42 pm, Diez B. Roggischde...@nospam.web.de wrote: Am 25.01.10 21:15, schrieb AlexM: On Jan 25, 2:03 pm, Diez B. Roggischde...@nospam.web.dewrote: Am 25.01.10 20:39, schrieb AlexM: On Jan 25, 1:23 pm, Diez B. Roggischde...@nospam.web.de

Re: list.pop(0) vs. collections.dequeue

2010-01-25 Thread Arnaud Delobelle
Steve Howell showel...@yahoo.com writes: [...] My algorithm does exactly N pops and roughly N list accesses, so I would be going from N*N + N to N + N log N if switched to blist. Can you post your algorithm? It would be interesting to have a concrete use case to base this discussion on. --

Re: list.pop(0) vs. collections.dequeue

2010-01-25 Thread Stephen Hansen
On Mon, Jan 25, 2010 at 9:31 AM, Steve Howell showel...@yahoo.com wrote: Another way of looking at it is that you would need to have 250 or so lists in memory at the same time before the extra pointer was even costing you kilobytes of memory. My consumer laptop has 3027908k of memory. Umm,

Re: Total maximal size of data

2010-01-25 Thread AlexM
On Jan 25, 3:31 pm, Diez B. Roggisch de...@nospam.web.de wrote: Am 25.01.10 22:22, schrieb AlexM: On Jan 25, 2:42 pm, Diez B. Roggischde...@nospam.web.de  wrote: Am 25.01.10 21:15, schrieb AlexM: On Jan 25, 2:03 pm, Diez B. Roggischde...@nospam.web.de    wrote: Am 25.01.10 20:39,

Re: list.pop(0) vs. collections.dequeue

2010-01-25 Thread Steve Howell
On Jan 25, 1:32 pm, Arnaud Delobelle arno...@googlemail.com wrote: Steve Howell showel...@yahoo.com writes: [...] My algorithm does exactly N pops and roughly N list accesses, so I would be going from N*N + N to N + N log N if switched to blist. Can you post your algorithm?  It would be

Re: list.pop(0) vs. collections.dequeue

2010-01-25 Thread Steve Howell
On Jan 25, 1:32 pm, Arnaud Delobelle arno...@googlemail.com wrote: Steve Howell showel...@yahoo.com writes: [...] My algorithm does exactly N pops and roughly N list accesses, so I would be going from N*N + N to N + N log N if switched to blist. Can you post your algorithm?  It would be

Re: Total maximal size of data

2010-01-25 Thread Diez B. Roggisch
Well, there actually is a way of building programs that may use more than 4GB of memory on 32 machines for Linux with higmem kernels, but I guess this would not work for python. As I said, it's essentially paging: http://kerneltrap.org/node/2450 And it's not something you can just compile

Re: Terminal application with non-standard print

2010-01-25 Thread Grant Edwards
On 2010-01-25, Hans Mulder han...@xs4all.nl wrote: Grant Edwards wrote: On 2010-01-24, R?mi babedo...@yahoo.fr wrote: I would like to do a Python application that prints data to stdout, but not the common way. I do not want the lines to be printed after each other, but the old lines to be

site.py confusion

2010-01-25 Thread George Trojan
Inspired by the 'Default path for files' thread I tried to use sitecustomize in my code. What puzzles me is that the site.py's main() is not executed. My sitecustomize.py is def main(): print 'In Main()' main() and the test program is import site #site.main() print 'Hi' The output is $

Re: Terminal application with non-standard print

2010-01-25 Thread Sean DiZazzo
On Jan 24, 11:27 am, Rémi babedo...@yahoo.fr wrote: Hello everyone, I would like to do a Python application that prints data to stdout, but not the common way. I do not want the lines to be printed after each other, but the old lines to be replaced with the new ones, like wget does it for

Python, PIL and 16 bit per channel images

2010-01-25 Thread Peter Chant
Does anyone know whether PIL can handle 16 bit per channel RGB images? PyPNG site (http://packages.python.org/pypng/ca.html) states PIL uses 8 bits per channel internally. Thanks, Pete -- http://www.petezilla.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Re: list.pop(0) vs. collections.dequeue

2010-01-25 Thread Chris Colbert
On Mon, Jan 25, 2010 at 5:09 PM, Steve Howell showel...@yahoo.com wrote: On Jan 25, 1:32 pm, Arnaud Delobelle arno...@googlemail.com wrote: Steve Howell showel...@yahoo.com writes: [...] My algorithm does exactly N pops and roughly N list accesses, so I would be going from N*N + N

Re: Python, PIL and 16 bit per channel images

2010-01-25 Thread Chris Colbert
On Mon, Jan 25, 2010 at 5:04 PM, Peter Chant pet...@mpeteozilla.vco.ukewrote: Does anyone know whether PIL can handle 16 bit per channel RGB images? PyPNG site (http://packages.python.org/pypng/ca.html) states PIL uses 8 bits per channel internally. Thanks, Pete --

Re: list.pop(0) vs. collections.dequeue

2010-01-25 Thread Steve Howell
On Jan 25, 1:00 pm, Paul Rubin no.em...@nospam.invalid wrote: Steve Howell showel...@yahoo.com writes: These are the reasons I am not using deque: Thanks for these.  Now we are getting somewhere.   1) I want to use native lists, so that downstream methods can use them as lists. It

Re: list.pop(0) vs. collections.dequeue

2010-01-25 Thread Steve Howell
On Jan 25, 1:32 pm, Arnaud Delobelle arno...@googlemail.com wrote: Steve Howell showel...@yahoo.com writes: [...] My algorithm does exactly N pops and roughly N list accesses, so I would be going from N*N + N to N + N log N if switched to blist. Can you post your algorithm?  It would be

Re: list.pop(0) vs. collections.dequeue

2010-01-25 Thread Steve Howell
--- On Mon, 1/25/10, Chris Colbert sccolb...@gmail.com wrote: looking at that code, i think you could solve your whole problem with a single called to reversed() (which is NOT the same as list.reverse())  I do not think that's actually true. It does no good to pop elements off a copy of

Re: list.pop(0) vs. collections.dequeue

2010-01-25 Thread geremy condra
On Sat, Jan 23, 2010 at 4:38 AM, Alf P. Steinbach al...@start.no wrote: snip Hm, it would be nice if the Python docs offered complexity (time) guarantees in general... Cheers, - Alf This would be a very welcome improvement IMHO- especially in collections. Geremy Condra --

RE: ctypes for AIX

2010-01-25 Thread Waddle, Jim
Chris, Thanks for responding to my email. I apologize for the remark about python only being developed for windows. I got the impression when I was looking at the ActivePython web site and saw that the version of python that they had available was not supported on very many unix systems. I

Re: list.pop(0) vs. collections.dequeue

2010-01-25 Thread Ethan Furman
Steve Howell wrote: On Sat, 23 Jan 2010 09:57:04 -0500, Roy Smith wrote: So, we're right back to my statement earlier in this thread that the docs are deficient in that they describe behavior with no hint about cost. Given that, it should be no surprise that users make incorrect assumptions

Re: list.pop(0) vs. collections.dequeue

2010-01-25 Thread Alf P. Steinbach
* Ethan Furman: Steve Howell wrote: On Sat, 23 Jan 2010 09:57:04 -0500, Roy Smith wrote: So, we're right back to my statement earlier in this thread that the docs are deficient in that they describe behavior with no hint about cost. Given that, it should be no surprise that users make

Re: list.pop(0) vs. collections.dequeue

2010-01-25 Thread Jerry Hill
On Sat, Jan 23, 2010 at 4:38 AM, Alf P. Steinbach al...@start.no wrote: Hm, it would be nice if the Python docs offered complexity (time) guarantees in general... Last time it came up, I don't think there was any core developer interest in putting complexity guarantees in the Python Language

TypeError not caught by except statement

2010-01-25 Thread siddhartha veedaluru
Hi, except not able to caught the TypeError exception occured in the below code log.info(refer,ret) in the try block throws a TypeError which is not caught . Also sometimes process is getting hanged.

Re: Sikuli: the coolest Python project I have yet seen...

2010-01-25 Thread Ron
OK, here's an idea. I used to do screen scraping scripts and run them as CGI scripts with an HTMl user interface. Why not run Sikuli on Jython on a JVM running on my server, so that I can do my screen scraping with Sikuli? I can take user inputs by using CGI forms from a web client, process the

Re: easy_install error ...

2010-01-25 Thread tekion
FYI, I figured out what I was doing wrong. After reading the setuptools docs, I noticed took out the quotes around the package name and it works, see details below: python setup.py easy_install -m docutils==0.4 running easy_install Searching for docutils==0.4 Best match: docutils 0.4 Processing

Re: list.pop(0) vs. collections.dequeue

2010-01-25 Thread Paul Rubin
Steve Howell showel...@yahoo.com writes: I haven't profiled deque vs. list, but I think you are correct about pop() possibly being a red herring For really large lists, I suppose memmove() would eventually start to become a bottleneck, but it's brutally fast when it just moves a couple

Re: list.pop(0) vs. collections.dequeue

2010-01-25 Thread Steve Howell
On Jan 24, 11:28 am, a...@pythoncraft.com (Aahz) wrote: In article b4440231-f33f-49e1-9d6f-5fbce0a63...@b2g2000yqi.googlegroups.com, Steve Howell  showel...@yahoo.com wrote: Even with realloc()'s brokenness, you could improve pop(0) in a way that does not impact list access at all, and the

Re: Splitting text at whitespace but keeping the whitespace in thereturned list

2010-01-25 Thread Tim Arnold
MRAB pyt...@mrabarnett.plus.com wrote in message news:mailman.1362.1264353878.28905.python-l...@python.org... pyt...@bdurham.com wrote: I need to parse some ASCII text into 'word' sized chunks of text AND collect the whitespace that seperates the split items. By 'word' I mean any string of

Re: list.pop(0) vs. collections.dequeue

2010-01-25 Thread Steve Howell
On Jan 25, 8:31 pm, Paul Rubin no.em...@nospam.invalid wrote: Steve Howell showel...@yahoo.com writes: I haven't profiled deque vs. list, but I think you are correct about pop() possibly being a red herring For really large lists, I suppose memmove() would eventually start to become a

Authenticated encryption with PyCrypto

2010-01-25 Thread Daniel
Just got done reading this thread: http://groups.google.com/group/comp.lang.python/browse_thread/thread/b31a5b5f58084f12/0e09f5f5542812c3 and I'd appreciate feedback on this recipe: http://code.activestate.com/recipes/576980/ Of course, it does not meet all of the requirements set forth by the

Re: [Edu-sig] some turtle questions

2010-01-25 Thread kirby urner
Hi Brian -- If you wanna go to a lot of work, but not a huge amount, write wrapper class for the Standard Library turtle that intercepts its commands and updates an on-board data structure, representing pixels x pixels, specifying self position, keep color info stashed per each one. That's a lot

[issue7775] str.rpartition(sep) - (tail, sep, head)

2010-01-25 Thread kai zhu
kai zhu kaizhu...@gmail.com added the comment: documentation bug should be changed to: S.rpartition(sep) - (head, sep, tail) help(str.rpartition) Help on method_descriptor: rpartition(...) S.rpartition(sep) - (tail, sep, head) Search for the separator sep in S, starting at the end

[issue7775] str.rpartition(sep) - (tail, sep, head)

2010-01-25 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7775 ___ ___ Python-bugs-list

[issue7775] str.rpartition(sep) - (tail, sep, head)

2010-01-25 Thread July Tikhonov
July Tikhonov july.t...@gmail.com added the comment: Not only str, but also bytearray, unicode, and bytes. -- keywords: +patch nosy: +july Added file: http://bugs.python.org/file15998/rpartition-docstrings-trunk.diff ___ Python tracker

[issue7775] str.rpartition(sep) - (tail, sep, head)

2010-01-25 Thread July Tikhonov
Changes by July Tikhonov july.t...@gmail.com: Added file: http://bugs.python.org/file15999/rpartition-docstrings-py3k.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7775 ___

  1   2   >