[ANN] guidata v1.5.1

2012-11-08 Thread Pierre.RAYBAUT
Hi all, I am pleased to announce that `guidata` v1.5.1 has been released (http://guidata.googlecode.com). Based on the Qt Python binding module PyQt4 (and mostly compatible with PySide), guidata is a Python library generating graphical user interfaces for easy dataset editing and display. It

[ANN] guiqwt v2.2.1

2012-11-08 Thread Pierre.RAYBAUT
Hi all, I am pleased to announce that `guiqwt` v2.2.1 has been released (http://guiqwt.googlecode.com). Based on PyQwt (plotting widgets for PyQt4 graphical user interfaces) and on the scientific modules NumPy and SciPy, guiqwt is a Python library providing efficient 2D data-plotting features

Unconverted data remains

2012-11-08 Thread Nikhil Verma
Hi My Problem I have a list :- L = ['Sunday November 11 2012 9:00pm ', 'Thursday November 15 2012 7:00pm ',\ 'Friday November 16 2012 7:00pm ', 'Monday November 19 2012 7:30pm ', \ 'Friday November 23 2012 7:30pm ', 'Sunday November 25 2012 8:00pm ',\

Re: Multi-dimensional list initialization

2012-11-08 Thread Andrew Robinson
On 11/07/2012 11:09 PM, Ian Kelly wrote: On Wed, Nov 7, 2012 at 8:13 PM, Andrew Robinson andr...@r3dsolutions.com wrote: OK, and is this a main use case? (I'm not saying it isn't I'm asking.) I have no idea what is a main use case. Well, then we can't evaluate if it's worth keeping a list

Re: Read number of CSV files

2012-11-08 Thread Peter Otten
Smaran Harihar wrote: I am able to read through a CSV File and fetch the data inside the CSV file but I have a really big list of CSV files and I wish to do the same particular code in all the CSV files. Is there some way that I can loops through all these files, which are in a single

Re: Unconverted data remains

2012-11-08 Thread Peter Otten
Nikhil Verma wrote: I have a list :- L = ['Sunday November 11 2012 9:00pm ', 'Thursday November 15 2012 7:00pm ',\ [...] 2012 7:00pm '] final_event_time = [datetime.strptime(iterable, '%A %B %d %Y %I:%M%p') for iterable in L] and having this error Unconverted data remains . I am

Re: creating size-limited tar files

2012-11-08 Thread andrea crotti
2012/11/7 Oscar Benjamin oscar.j.benja...@gmail.com: Correct. But if you read the rest of Alexander's post you'll find a suggestion that would work in this case and that can guarantee to give files of the desired size. You just need to define your own class that implements a write() method

Re: creating size-limited tar files

2012-11-08 Thread andrea crotti
2012/11/8 andrea crotti andrea.crott...@gmail.com: Yes yes I saw the answer, but now I was thinking that what I need is simply this: tar czpvf - /path/to/archive | split -d -b 100M - tardisk since it should run only on Linux it's probably way easier, my script will then only need to

Re: Right solution to unicode error?

2012-11-08 Thread wxjmfauth
Le mercredi 7 novembre 2012 23:17:42 UTC+1, Anders a écrit : I've run into a Unicode error, and despite doing some googling, I can't figure out the right way to fix it. I have a Python 2.6 script that reads my Outlook 2010 task list. I'm able to read the tasks from Outlook and store them

Re: Right solution to unicode error?

2012-11-08 Thread Hans Mulder
On 8/11/12 00:53:49, Steven D'Aprano wrote: This error confuses me. Is that an exact copy and paste of the error, or have you edited it or reconstructed it? Because it seems to me that if task.subject is a unicode string, as it appears to be, calling print on it should succeed: py s =

isinstance(.., file) for Python 3

2012-11-08 Thread Ulrich Eckhardt
Hi! I have two problems that are related and that I'd like to solve together. Firstly, I have code that allows either a file or a string representing its content as parameter. If the parameter is a file, the content is read from the file. In Python 2, I used isinstance(p, file) to determine

Re: isinstance(.., file) for Python 3

2012-11-08 Thread MRAB
On 2012-11-08 12:05, Ulrich Eckhardt wrote: Hi! I have two problems that are related and that I'd like to solve together. Firstly, I have code that allows either a file or a string representing its content as parameter. If the parameter is a file, the content is read from the file. In Python

Re: Unconverted data remains

2012-11-08 Thread MRAB
On 2012-11-08 08:04, Nikhil Verma wrote: Hi My Problem I have a list :- L = ['Sunday November 11 2012 9:00pm ', 'Thursday November 15 2012 7:00pm ',\ 'Friday November 16 2012 7:00pm ', 'Monday November 19 2012 7:30pm ', \ 'Friday November 23 2012

Re: isinstance(.., file) for Python 3

2012-11-08 Thread Chris Angelico
On Thu, Nov 8, 2012 at 11:05 PM, Ulrich Eckhardt ulrich.eckha...@dominolaser.com wrote: Firstly, I have code that allows either a file or a string representing its content as parameter. If the parameter is a file, the content is read from the file. In Python 2, I used isinstance(p, file) to

Re: isinstance(.., file) for Python 3

2012-11-08 Thread Peter Otten
Ulrich Eckhardt wrote: Hi! I have two problems that are related and that I'd like to solve together. Firstly, I have code that allows either a file or a string representing its content as parameter. If the parameter is a file, the content is read from the file. In Python 2, I used

Re: isinstance(.., file) for Python 3

2012-11-08 Thread Steven D'Aprano
On Thu, 08 Nov 2012 13:05:22 +0100, Ulrich Eckhardt wrote: Firstly, I have code that allows either a file or a string representing its content as parameter. If the parameter is a file, the content is read from the file. In Python 2, I used isinstance(p, file) to determine whether the

Re: Numpy module

2012-11-08 Thread Anssi Saari
farrellpolym...@gmail.com writes: Hello to the group! I've learned a lot about Ubuntu just trying to install numpy for Python 3.2.3. I've finally managed to put it in the Python3.2 directory but when I try to import it, I still get there's no module named numpy. There are other modules

Re: error

2012-11-08 Thread inshu chauhan
Actually data is neither a zanzibar nor a class nor a list.. its a yml image. with pixels I am trying to access pixels of a 3D image through this programme.. On Tue, Nov 6, 2012 at 8:59 PM, woooee woo...@gmail.com wrote: From this line, data appears to be a class if 0 ix data.width

Re: isinstance(.., file) for Python 3

2012-11-08 Thread Duncan Booth
Ulrich Eckhardt ulrich.eckha...@dominolaser.com wrote: If possible, I'm looking for a solution that works for Pythons 2 and 3, since I'm not fully through the conversion yet and have clients that might use the older snake for some time before shedding their skin. Suggestions? Why bother

RE: Right solution to unicode error?

2012-11-08 Thread Anders Schneiderman
Thanks, Oscar and Ramit! This is exactly what I was looking for. Anders -Original Message- From: Oscar Benjamin [mailto:oscar.j.benja...@gmail.com] Sent: Wednesday, November 07, 2012 6:27 PM To: Anders Schneiderman Cc: python-list@python.org Subject: Re: Right solution to unicode

Re: Right solution to unicode error?

2012-11-08 Thread Oscar Benjamin
On 8 November 2012 00:44, Oscar Benjamin oscar.j.benja...@gmail.com wrote: On 7 November 2012 23:51, Andrew Berg bahamutzero8...@gmail.com wrote: On 2012.11.07 17:27, Oscar Benjamin wrote: Are you using cmd.exe (standard Windows terminal)? If so, it does not support unicode Actually, it does.

Re: Numpy module

2012-11-08 Thread Colin J. Williams
On 08/11/2012 8:09 AM, Anssi Saari wrote: farrellpolym...@gmail.com writes: [snip] Does Numpy 1.6.2 not run with Python 3.2.3? It does on the Raspberry Pi, which uses a variant of Debian. Colin W. -- http://mail.python.org/mailman/listinfo/python-list

Executing .exe on a remote Windows machine

2012-11-08 Thread Kevin Holleran
Good morning, I wrote a python script to connect out to a bunch of my remote machines that are running some software. It modifies a bunch of the config files for me. After making the changes, I need to restart the software. The way to do this is to call an .exe passing in a argument 'restart'

Re: Multi-dimensional list initialization

2012-11-08 Thread wrw
On Nov 7, 2012, at 11:51 PM, Andrew Robinson andr...@r3dsolutions.com wrote: On 11/07/2012 04:00 PM, Steven D'Aprano wrote: Andrew, it appears that your posts are being eaten or rejected by my ISP's news server, because they aren't showing up for me. Possibly a side- effect of your dates

Re: Executing .exe on a remote Windows machine

2012-11-08 Thread Tim Golden
On 08/11/2012 14:25, Kevin Holleran wrote: Good morning, I wrote a python script to connect out to a bunch of my remote machines that are running some software. It modifies a bunch of the config files for me. After making the changes, I need to restart the software. The way to do this is

Re: Executing .exe on a remote Windows machine

2012-11-08 Thread Kevin Holleran
My goodness psexec. thanks can't believe that didn't come to me... -- Kevin Holleran Master of Science, Computer Information Systems Grand Valley State University Master of Business Administration Western Michigan University SANS GCFE, CCNA, ISA, MCSA, MCDST, MCP My Paleo Fitness

Re: Right solution to unicode error?

2012-11-08 Thread wxjmfauth
Le jeudi 8 novembre 2012 15:07:23 UTC+1, Oscar Benjamin a écrit : On 8 November 2012 00:44, Oscar Benjamin oscar.j.benja...@gmail.com wrote: On 7 November 2012 23:51, Andrew Berg bahamutzero8...@gmail.com wrote: On 2012.11.07 17:27, Oscar Benjamin wrote: Are you using cmd.exe

Re: isinstance(.., file) for Python 3

2012-11-08 Thread Stefan Behnel
Duncan Booth, 08.11.2012 14:58: Ulrich Eckhardt wrote: If possible, I'm looking for a solution that works for Pythons 2 and 3, since I'm not fully through the conversion yet and have clients that might use the older snake for some time before shedding their skin. Suggestions? Why bother

Re: Executing .exe on a remote Windows machine

2012-11-08 Thread Kevin Holleran
On Thu, Nov 8, 2012 at 9:43 AM, Kevin Holleran kdaw...@gmail.com wrote: My goodness psexec. thanks can't believe that didn't come to me... On Thu, Nov 8, 2012 at 9:31 AM, Tim Golden m...@timgolden.me.uk wrote: On 08/11/2012 14:25, Kevin Holleran wrote: Good morning, I

Re: Multi-dimensional list initialization

2012-11-08 Thread Ian Kelly
On Thu, Nov 8, 2012 at 1:26 AM, Andrew Robinson andr...@r3dsolutions.com wrote: OK: Then copy by reference using map: values = zip( map( lambda:times, xrange(num_groups) ) ) if len(values) len(times) * num_groups ... Done. It's clearer than a list comprehension and you still really

int.__init__ incompatible in Python 3.3

2012-11-08 Thread Ulrich Eckhardt
Hi! Preparing for an upgrade from 2.7 to 3, I stumbled across an incompatibility between 2.7 and 3.2 on one hand and 3.3 on the other: class X(int): def __init__(self, value): super(X, self).__init__(value) X(42) On 2.7 and 3.2, the above code works. On 3.3, it gives me a

Re: Executing .exe on a remote Windows machine

2012-11-08 Thread Tim Golden
On 08/11/2012 15:37, Kevin Holleran wrote: [code] try: print(Attempting to restart Splunk...) subprocess.call([psexec, + host, 'c:\\Program Files\\Splunk\\bin\\splunk.exe', restart]) [/code] am getting: [output] Attempting to restart Splunk... PsExec

Re: Executing .exe on a remote Windows machine

2012-11-08 Thread Chris Rebert
On Thursday, November 8, 2012, Kevin Holleran wrote: On Thu, Nov 8, 2012 at 9:43 AM, Kevin Holleran kdaw...@gmail.comjavascript:_e({}, 'cvml', 'kdaw...@gmail.com'); wrote: My goodness psexec. thanks can't believe that didn't come to me... On Thu, Nov 8, 2012 at 9:31 AM, Tim

Re: error

2012-11-08 Thread Dave Angel
On 11/08/2012 08:47 AM, inshu chauhan wrote: Actually data is neither a zanzibar nor a class nor a list.. its a yml image. with pixels I am trying to access pixels of a 3D image through this programme.. You want us to keep guessing? And without supplying any new information? There's no

Re: Executing .exe on a remote Windows machine

2012-11-08 Thread Kevin Holleran
On Thu, Nov 8, 2012 at 11:32 AM, Chris Rebert c...@rebertia.com wrote: On Thursday, November 8, 2012, Kevin Holleran wrote: On Thu, Nov 8, 2012 at 9:43 AM, Kevin Holleran kdaw...@gmail.com wrote: My goodness psexec. thanks can't believe that didn't come to me... On Thu, Nov 8,

Re: accuracy problem in calculation

2012-11-08 Thread Chris Angelico
On Fri, Nov 9, 2012 at 4:05 AM, Debashish Saha silid...@gmail.com wrote: (15+1.00067968)-(15+1.00067961) Out[102]: 2.384185791015625e-07 1.00067968-(1.00067961) Out[103]: 7.1866624e-08 above i am showing the two different results,though the two outputs should be

Re: int.__init__ incompatible in Python 3.3

2012-11-08 Thread Ian Kelly
On Thu, Nov 8, 2012 at 8:55 AM, Ulrich Eckhardt ulrich.eckha...@dominolaser.com wrote: Hi! Preparing for an upgrade from 2.7 to 3, I stumbled across an incompatibility between 2.7 and 3.2 on one hand and 3.3 on the other: class X(int): def __init__(self, value): super(X,

duck typing assert

2012-11-08 Thread Andriy Kornatskyy
People who come from strongly typed languages that offer interfaces often are confused by lack of one in Python. Python, being dynamic typing programming language, follows duck typing principal. It can as simple as this: assert looks(Foo).like(IFoo) The post below shows how programmer can

duck typing assert‏

2012-11-08 Thread Andriy Kornatskyy
People who come from strongly typed languages that offer interfaces often are confused by lack of one in Python. Python, being dynamic typing programming language, follows duck typing principal. It can as simple as this:   assert looks(Foo).like(IFoo)   The post below shows how programmer can

Re: accuracy problem in calculation

2012-11-08 Thread Dave Angel
On 11/08/2012 12:05 PM, Debashish Saha wrote: (15+1.00067968)-(15+1.00067961) Out[102]: 2.384185791015625e-07 1.00067968-(1.00067961) Out[103]: 7.1866624e-08 above i am showing the two different results,though the two outputs should be same if we do it in copy(the

how to simulate tar filename substitution across piped subprocess.Popen() calls?

2012-11-08 Thread jkn
Hi All i am trying to build up a set of subprocess.Ponen calls to replicate the effect of a horribly long shell command. I'm not clear how I can do one part of this and wonder if anyone can advise. I'm on Linux, fairly obviously. I have a command which (simplified) is a tar -c command piped

Re: accuracy problem in calculation

2012-11-08 Thread Grant Edwards
On 2012-11-08, Chris Angelico ros...@gmail.com wrote: On Fri, Nov 9, 2012 at 4:05 AM, Debashish Saha silid...@gmail.com wrote: (15+1.00067968)-(15+1.00067961) Out[102]: 2.384185791015625e-07 1.00067968-(1.00067961) Out[103]: 7.1866624e-08 above i am showing the two

Re: Right solution to unicode error?

2012-11-08 Thread Oscar Benjamin
On 8 November 2012 15:05, wxjmfa...@gmail.com wrote: Le jeudi 8 novembre 2012 15:07:23 UTC+1, Oscar Benjamin a écrit : On 8 November 2012 00:44, Oscar Benjamin oscar.j.benja...@gmail.com wrote: On 7 November 2012 23:51, Andrew Berg bahamutzero8...@gmail.com wrote: On 2012.11.07 17:27, Oscar

Re: duck typing assert

2012-11-08 Thread Ian Kelly
On Thu, Nov 8, 2012 at 10:30 AM, Andriy Kornatskyy andriy.kornats...@live.com wrote: People who come from strongly typed languages that offer interfaces often are confused by lack of one in Python. Python, being dynamic typing programming language, follows duck typing principal. It can as

Re: Right solution to unicode error?

2012-11-08 Thread Ian Kelly
On Thu, Nov 8, 2012 at 11:32 AM, Oscar Benjamin oscar.j.benja...@gmail.com wrote: If I want the other characters to work I need to change the code page: O:\chcp 65001 Active code page: 65001 O:\Q:\tools\Python33\python -c import sys; sys.stdout.buffer.write('\u03b1\n'.encode('utf-8')) α

RE: duck typing assert

2012-11-08 Thread Andriy Kornatskyy
Ian, Thank you for the comments. There is definitely a room for improvement, however there are limits. One of them is related to decorator that replaces decorated method arguments with something like *args, **kwargs. Here is an example. def x():     def decorate(m):     def x(*args,

Re: Right solution to unicode error?

2012-11-08 Thread wxjmfauth
Le jeudi 8 novembre 2012 19:32:14 UTC+1, Oscar Benjamin a écrit : On 8 November 2012 15:05, wxjmfa...@gmail.com wrote: Le jeudi 8 novembre 2012 15:07:23 UTC+1, Oscar Benjamin a écrit : On 8 November 2012 00:44, Oscar Benjamin oscar.j.benja...@gmail.com wrote: On 7 November 2012

Re: Right solution to unicode error?

2012-11-08 Thread wxjmfauth
Le jeudi 8 novembre 2012 19:49:24 UTC+1, Ian a écrit : On Thu, Nov 8, 2012 at 11:32 AM, Oscar Benjamin oscar.j.benja...@gmail.com wrote: If I want the other characters to work I need to change the code page: O:\chcp 65001 Active code page: 65001

Re: int.__init__ incompatible in Python 3.3

2012-11-08 Thread Terry Reedy
On 11/8/2012 12:13 PM, Ian Kelly wrote: On Thu, Nov 8, 2012 at 8:55 AM, Ulrich Eckhardt ulrich.eckha...@dominolaser.com wrote: Preparing for an upgrade from 2.7 to 3, I stumbled across an incompatibility between 2.7 and 3.2 on one hand and 3.3 on the other: class X(int): def

Re: duck typing assert‏

2012-11-08 Thread Terry Reedy
On 11/8/2012 12:34 PM, Andriy Kornatskyy wrote: People who come from strongly typed languages that offer interfaces often are confused by lack of one in Python. Python, being dynamic typing programming language, follows duck typing principal. It can as simple as this: assert

Re: Right solution to unicode error?

2012-11-08 Thread Ian Kelly
On Thu, Nov 8, 2012 at 12:54 PM, wxjmfa...@gmail.com wrote: Font has nothing to do here. You are simply wrongly encoding your unicode. '\u2013' '–' '\u2013'.encode('utf-8') b'\xe2\x80\x93' '\u2013'.encode('utf-8').decode('cp1252') '–' No, it seriously is the font. This is what I get

RE: Right solution to unicode error?

2012-11-08 Thread Prasad, Ramit
wxjmfa...@gmail.com wrote: Le jeudi 8 novembre 2012 19:49:24 UTC+1, Ian a écrit : On Thu, Nov 8, 2012 at 11:32 AM, Oscar Benjamin oscar.j.benja...@gmail.com wrote: If I want the other characters to work I need to change the code page: O:\chcp 65001 Active code page: 65001

Re: Right solution to unicode error?

2012-11-08 Thread Ian Kelly
On Thu, Nov 8, 2012 at 1:54 PM, Prasad, Ramit ramit.pra...@jpmorgan.com wrote: Why would font not matter? Unicode is the abstract definition of all characters right? From that we map the abstract character to a code page/set, which gives real values for an abstract character. From that code

Re: Right solution to unicode error?

2012-11-08 Thread Oscar Benjamin
On 8 November 2012 19:54, wxjmfa...@gmail.com wrote: Le jeudi 8 novembre 2012 19:49:24 UTC+1, Ian a écrit : On Thu, Nov 8, 2012 at 11:32 AM, Oscar Benjamin oscar.j.benja...@gmail.com wrote: If I want the other characters to work I need to change the code page: O:\chcp 65001 Active

How to print python commands automatically?

2012-11-08 Thread Peng Yu
Hi, In bash, set -v will print the command executed. For example, the following screen output shows that the echo command is printed automatically. Is there a similar thing in python? ~/linux/test/bash/man/builtin/set/-v$ cat main.sh #!/usr/bin/env bash set -v echo Hello World!

Re: Multi-dimensional list initialization

2012-11-08 Thread 88888 Dihedral
On Monday, November 5, 2012 3:07:12 PM UTC+8, Chris Rebert wrote: On Sun, Nov 4, 2012 at 10:27 PM, Demian Brecht demianbre...@gmail.com wrote: So, here I was thinking oh, this is a nice, easy way to initialize a 4D matrix (running 2.7.3, non-core libs not allowed): m = [[None] * 4]

Re: duck typing assert‏

2012-11-08 Thread Steven D'Aprano
On Thu, 08 Nov 2012 20:34:58 +0300, Andriy Kornatskyy wrote: People who come from strongly typed languages that offer interfaces often are confused by lack of one in Python. Python, being dynamic typing programming language, follows duck typing principal. It can as simple as this:   assert

Re: duck typing assert‏

2012-11-08 Thread Steven D'Aprano
On Thu, 08 Nov 2012 15:39:24 -0500, Terry Reedy wrote: [...] test.py:21: UserWarning: 'bar': is not property. assert looks(Foo).like(IFoo) Traceback (most recent call last): File test.py, line 21, in assert looks(Foo).like(IFoo) AssertionError ''' I view this check as an

Re: duck typing assert

2012-11-08 Thread Ian Kelly
On Thu, Nov 8, 2012 at 4:33 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Thu, 08 Nov 2012 20:34:58 +0300, Andriy Kornatskyy wrote: People who come from strongly typed languages that offer interfaces often are confused by lack of one in Python. Python, being dynamic

Re: how to simulate tar filename substitution across piped subprocess.Popen() calls?

2012-11-08 Thread Hans Mulder
On 8/11/12 19:05:11, jkn wrote: Hi All i am trying to build up a set of subprocess.Ponen calls to replicate the effect of a horribly long shell command. I'm not clear how I can do one part of this and wonder if anyone can advise. I'm on Linux, fairly obviously. I have a command which

Re: Multi-dimensional list initialization

2012-11-08 Thread Mark Lawrence
On 07/11/2012 01:55, Steven D'Aprano wrote: Who knows? Who cares? Nobody does: n -= n But I've seen this scattered through code: x := x - x - x -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to print python commands automatically?

2012-11-08 Thread rusi
On Nov 9, 4:12 am, Peng Yu pengyu...@gmail.com wrote: Hi, In bash, set -v will print the command executed. For example, the following screen output shows that the echo command is printed automatically. Is there a similar thing in python? ~/linux/test/bash/man/builtin/set/-v$ cat main.sh

Re: Right solution to unicode error?

2012-11-08 Thread Andrew Berg
On 2012.11.08 08:06, Oscar Benjamin wrote: It would be a lot better though if it just worked straight away without me needing to set the code page (like the terminal in every other OS I use). The crude equivalent of .bashrc/.zshrc/whatever shell startup script for cmd is setting a string value

Re: duck typing assert‏

2012-11-08 Thread Terry Reedy
On 11/8/2012 6:40 PM, Steven D'Aprano wrote: On Thu, 08 Nov 2012 15:39:24 -0500, Terry Reedy wrote: [...] test.py:21: UserWarning: 'bar': is not property. assert looks(Foo).like(IFoo) Traceback (most recent call last): File test.py, line 21, in assert looks(Foo).like(IFoo)

Re: Multi-dimensional list initialization

2012-11-08 Thread Chris Angelico
On Fri, Nov 9, 2012 at 12:39 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 07/11/2012 01:55, Steven D'Aprano wrote: Who knows? Who cares? Nobody does: n -= n But I've seen this scattered through code: x := x - x - x Can you enlighten us as to how this is better than either: x :=

Re: duck typing assert

2012-11-08 Thread Chris Angelico
On Fri, Nov 9, 2012 at 12:00 PM, Ian Kelly ian.g.ke...@gmail.com wrote: looks(Foo).like(IFoo), on the other hand, is crystal clear about which argument is which. I'm not so sure that it is, tbh. If you read it like an English sentence, it's clearly testing whether Foo matches the template in

Re: duck typing assert‏

2012-11-08 Thread Steven D'Aprano
On Thu, 08 Nov 2012 23:44:54 -0500, Terry Reedy wrote: On 11/8/2012 6:40 PM, Steven D'Aprano wrote: [...] IFoo.bar # returns a computed property Assuming IFoo is a class and bar is a property attribute of the class, IFoo.bar is the property object itself, not the computed property of an

Re: Multi-dimensional list initialization

2012-11-08 Thread Steven D'Aprano
On Fri, 09 Nov 2012 17:07:09 +1100, Chris Angelico wrote: On Fri, Nov 9, 2012 at 12:39 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 07/11/2012 01:55, Steven D'Aprano wrote: Who knows? Who cares? Nobody does: n -= n But I've seen this scattered through code: x := x - x - x

Re: Multi-dimensional list initialization

2012-11-08 Thread Chris Angelico
On Fri, Nov 9, 2012 at 5:37 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Fri, 09 Nov 2012 17:07:09 +1100, Chris Angelico wrote: Can you enlighten us as to how this is better than either: x := -x or x := 0 - x ? I'm not seeing it. I'm hoping that Mark intended it as

Writing game-state data...

2012-11-08 Thread Graham Fielding
Hey, folks, me again! I've been puzzling over this for a while now: I'm trying to write data to a file to save the state of my game using the following function: def save_game(): #open a new empty shelve (possibly overwriting an old one) to write the game data file_object =

Re: Multi-dimensional list initialization

2012-11-08 Thread Mark Lawrence
On 09/11/2012 06:37, Steven D'Aprano wrote: On Fri, 09 Nov 2012 17:07:09 +1100, Chris Angelico wrote: On Fri, Nov 9, 2012 at 12:39 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 07/11/2012 01:55, Steven D'Aprano wrote: Who knows? Who cares? Nobody does: n -= n But I've seen this

Re: Writing game-state data...

2012-11-08 Thread Mark Lawrence
On 09/11/2012 07:20, Graham Fielding wrote: Hey, folks, me again! I've been puzzling over this for a while now: I'm trying to write data to a file to save the state of my game using the following function: def save_game(): #open a new empty shelve (possibly overwriting an old one) to

[issue10385] Mark up subprocess as module in its doc

2012-11-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 58564aeec8e4 by Ezio Melotti in branch '2.7': #10385: use the mod role in subprocess docs. http://hg.python.org/cpython/rev/58564aeec8e4 New changeset 8e8d391eb3eb by Ezio Melotti in branch '3.2': #10385: use the mod role in subprocess docs.

[issue10385] Mark up subprocess as module in its doc

2012-11-08 Thread Ezio Melotti
Ezio Melotti added the comment: It looked OK and the :mod: role was already used throughout the page, so I applied the patch. -- assignee: belopolsky - ezio.melotti resolution: - fixed stage: commit review - committed/rejected status: open - closed type: - enhancement versions:

[issue10589] I/O ABC docs should specify which methods have implementations

2012-11-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: needs patch - patch review versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10589 ___

[issue11479] Add discussion of trailing slash in raw string to tutorial

2012-11-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- type: behavior - enhancement versions: +Python 3.4 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11479 ___

[issue10434] Document the rules for public names

2012-11-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy type: - enhancement versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10434 ___

[issue8269] Missing return values for PyUnicode C/API functions

2012-11-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - patch review versions: +Python 3.4 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8269 ___

[issue11974] Class definition gotcha.. should this be documented somewhere?

2012-11-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy stage: - needs patch versions: +Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11974 ___

[issue11762] Ast doc: warning and version number

2012-11-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy -patch type: - enhancement versions: +Python 3.4 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11762 ___

[issue8824] Improve documentation of exec

2012-11-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +mark.dickinson type: - enhancement versions: +Python 3.4 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8824 ___

[issue12077] Harmonizing descriptor protocol documentation

2012-11-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- type: - enhancement versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12077 ___

[issue11975] Fix referencing of built-in types (list, int, ...)

2012-11-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +chris.jerdonek type: - enhancement versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11975 ___

[issue12645] test.support. import_fresh_module - incorrect doc

2012-11-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ncoghlan stage: - needs patch type: - enhancement versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12645 ___

[issue16433] unittest.TestCase.assertNotEqual has incorrect docstring.

2012-11-08 Thread Mark Dickinson
New submission from Mark Dickinson: The TestCase.assertNotEqual docstring currently says: Fail if the two objects are equal as determined by the '==' operator. This doesn't match the implementation, which checks that '!=' gives True (rather than checking that '==' gives False). The online

[issue11481] The copy module already uses copyreg

2012-11-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2bd6150b48ea by Ezio Melotti in branch '2.7': #11481: update copy_reg docs and add example. http://hg.python.org/cpython/rev/2bd6150b48ea New changeset e089bdca9d9c by Ezio Melotti in branch '2.7': #11481: fix markup.

[issue11481] The copy module already uses copyreg

2012-11-08 Thread Ezio Melotti
Ezio Melotti added the comment: I made a few minor changes and applied the patch. -- assignee: docs@python - ezio.melotti resolution: - fixed stage: patch review - committed/rejected status: open - closed type: - enhancement ___ Python tracker

[issue16433] unittest.TestCase.assertNotEqual has incorrect docstring.

2012-11-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset d32d04edd371 by Ezio Melotti in branch '2.7': #16433: fix docstring of assertNotEqual. http://hg.python.org/cpython/rev/d32d04edd371 New changeset 9d5cc978cfe5 by Ezio Melotti in branch '3.2': #16433: fix docstring of assertNotEqual.

[issue16433] unittest.TestCase.assertNotEqual has incorrect docstring.

2012-11-08 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the report! -- assignee: - ezio.melotti nosy: +ezio.melotti resolution: - fixed stage: - committed/rejected status: open - closed type: - enhancement ___ Python tracker rep...@bugs.python.org

[issue16433] unittest.TestCase.assertNotEqual has incorrect docstring.

2012-11-08 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Ezio! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16433 ___ ___ Python-bugs-list mailing list

[issue16431] CDecimal disregards subclass passed into __new__ when value argument is an instance of Decimal

2012-11-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9a701e8ec2c9 by Stefan Krah in branch '3.3': Issue #16431: Finally, consider all permutations. http://hg.python.org/cpython/rev/9a701e8ec2c9 -- ___ Python tracker rep...@bugs.python.org

[issue16431] CDecimal disregards subclass passed into __new__ when value argument is an instance of Decimal

2012-11-08 Thread Stefan Krah
Stefan Krah added the comment: Thanks, Amaury. Should be fixed now. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16431

[issue11479] Add discussion of trailing backslash in raw string to tutorial

2012-11-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- title: Add discussion of trailing slash in raw string to tutorial - Add discussion of trailing backslash in raw string to tutorial ___ Python tracker rep...@bugs.python.org

[issue16433] unittest.TestCase.assertNotEqual has incorrect docstring.

2012-11-08 Thread Andrew Svetlov
Andrew Svetlov added the comment: Maybe better to use: Fail if the two objects are *not* equal as determined by the '!=' operator. ??? -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16433

[issue16433] unittest.TestCase.assertNotEqual has incorrect docstring.

2012-11-08 Thread Mark Dickinson
Mark Dickinson added the comment: Andrew: if the objects are not equal, the test should pass, not fail. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16433 ___

[issue16434] SocketServer call shutdown in the wrong way

2012-11-08 Thread Erik Günther
New submission from Erik Günther: I have a small development WSGI-server using PythonPaste and when shutting it down I somtimes get the following error on one or two threads: ---8--- Traceback (most recent call last): File

[issue16434] SocketServer call shutdown in the wrong way

2012-11-08 Thread Erik Günther
Changes by Erik Günther erik.gunt...@gmail.com: -- type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16434 ___ ___

[issue16434] SocketServer call shutdown in the wrong way

2012-11-08 Thread Erik Günther
Erik Günther added the comment: Sorry forgot to tell in what versions.. Its in Ubuntu 12.04-1 Python version 2.7.3 Ubuntu package version: 2.7.3-0ubuntu3.1 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16434

[issue15721] PEP 3121, 384 Refactoring applied to tkinter module

2012-11-08 Thread Robin Schreiber
Changes by Robin Schreiber robin.schrei...@me.com: -- keywords: +pep3121 -patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15721 ___ ___

[issue15650] PEP 3121, 384 refactoring applied to dbm module

2012-11-08 Thread Robin Schreiber
Changes by Robin Schreiber robin.schrei...@me.com: -- keywords: +pep3121 -patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15650 ___ ___

  1   2   3   >