CaptureMock 0.2 - true record-playback mocking for Python (and other things)

2011-06-10 Thread Geoff Bache
Hi all, There's a new release of CaptureMock out. For Python users it's mostly a collection of bugfixes on the original release, but it also adds new functionality to allow it to be used from other languages also. Regards, Geoff Bache More detail: CaptureMock is a tool for creating mocks via a

ackward 0.3 released

2011-06-10 Thread Austin Bingham
ackward 0.3 has been released. ackward is a boost.python-based C++ interface to parts of the Python standard library. It aims to simplify the use of Python modules in C++, both for embedding and extension situations. This release is largely a clean-up and documentation release, with some work

python-stdnet

2011-06-10 Thread Luca Sbardella
We're happy to announce the release of python-stdnet 0.5.5. Compatible with python 2.6 up to python 3.2. What is it? = An object relational mapper for redis (http://redis.io/) data-store server. With an API similar to django, you can build your own models in minutes. It is a compact,

ANN: GMPY2 alpha2 is available for testing

2011-06-10 Thread casevh
Everyone, I'm pleased to announce a new alpha release of GMPY2. GMPY2 is a wrapper for GMP and MPFR multiple-precision arithmetic libraries. If you have an interest in multiple-precision arithmetic or want more control over the handling of exceptional events in floating point arithmetic, please

JSONBOT 0.7.1 released

2011-06-10 Thread Bart Thate
Hello kids and parents !! I just want to announce the release of JSONBOT 0.7.1. This release consists of minor bug fixes and new xmpp auth code (SASL) which support DIGEST-MD5 and PLAIN authing. JSONBOT should run well again on systems with python2.5 installed. You can fetch it at

Looking for beta testers for Rapid Application Development tool for Python

2011-06-10 Thread Craig
We're looking for beta testers for our new product. Testers who send feedback and bug reports will be given a free copy of the released version of the software after testing is completed. What's our product? Gumption is a powerful and versatile toolkit for building computer applications using the

Re: the stupid encoding problem to stdout

2011-06-10 Thread Laurent Claessens
Le 09/06/2011 04:18, Sérgio Monteiro Basto a écrit : hi, cat test.py #!/usr/bin/env python #-*- coding: utf-8 -*- u = u'moçambique' print u.encode(utf-8) print u chmod +x test.py ../test.py moçambique moçambique The following tries to encode before to print. If you pass an already

Re: Python 2.6 OR 3.2

2011-06-10 Thread harrismh777
Terry Reedy wrote: A couple of years ago, users were people who were already programming with 2.x. That is changing now. ... big time ! :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.6 OR 3.2

2011-06-10 Thread harrismh777
Andrew Berg wrote: AFAICT, there are three reasons to learn Python 2: ... there is a fourth reason. The linux distro you are using currently was customized with python 2.x I ran into this problem this week in fact... on my HP g6 ubuntu notebook running 10.04 lucid. It ships with the

Re: Of Functions, Objects, and Methods-I NEED HELP PLEASE

2011-06-10 Thread Larry Hudson
On 06/08/2011 11:59 PM, Larry Hudson wrote: On 06/08/2011 01:09 PM, Cathy James wrote: I am almost there, but I need a little help: I would like to ... deleted text Here's one possible replacement. There are many other approaches as well. (This leaves the individual dogs as a (name, breed)

help on QUICKFIX

2011-06-10 Thread prakash jp
Hi, I am using quickfix, would like to start with that ..\quickfix-1.13.3\quickfix\examples\executor\python\executor.py asks for a configuration file how should it look like. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.6 OR 3.2

2011-06-10 Thread Benjamin Kaplan
On Thu, Jun 9, 2011 at 11:00 PM, harrismh777 harrismh...@charter.net wrote: Andrew Berg wrote: AFAICT, there are three reasons to learn Python 2:   ... there is a fourth reason. The linux distro you are using currently was customized with python 2.x I ran into this problem this week in

Re: how to inherit docstrings?

2011-06-10 Thread Gregory Ewing
Carl Banks wrote: Presumably, the reason you are overriding a method in a subclass is to change its behavior; Not always true by any means, and maybe not even usually true. Consider overriding for the purpose of implementing an abstract method, or because something about the internal

Re: how to inherit docstrings?

2011-06-10 Thread Gregory Ewing
Carl Banks wrote: x = random.choice([Triange(),Square()]) print x.draw.__doc__ # prints Draws a shape Quick, what shape is x.draw() going to draw? Your debugging code is insufficient. It should include print type(x) and then it will be obvious what shape is going to get drawn. -- Greg

Re: __doc__ immutable for classes (was: Re: how to inherit docstrings?)

2011-06-10 Thread Gregory Ewing
Eric Snow wrote: But for method objects (really a wrapper for bound functions) would it change the __doc__ of the wrapper or of the bound function? You probably wouldn't want to change the __doc__ of a method wrapper; instead you'd make sure you got hold of the underlying function first. So

Re: Any Better logic for this problem..

2011-06-10 Thread geremy condra
On Thu, Jun 9, 2011 at 6:10 PM, Dan Stromberg drsali...@gmail.com wrote: On Thu, Jun 9, 2011 at 10:55 AM, geremy condra debat...@gmail.com wrote: On Thu, Jun 9, 2011 at 4:38 AM, Dave Angel da...@ieee.org wrote: On 01/-10/-28163 02:59 PM, Chris Rebert wrote: On Thu, Jun 9, 2011 at 1:31

Re: how to inherit docstrings?

2011-06-10 Thread Steven D'Aprano
On Fri, 10 Jun 2011 07:33:34 +1000, Ben Finney wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: It's an unnecessary restriction, as far as I'm concerned, but an old one. Well, it's incompatible with the Python compiler I keep in my head. Have these developers no

Re: Python 2.6 OR 3.2

2011-06-10 Thread Steven D'Aprano
On Fri, 10 Jun 2011 01:00:35 -0500, harrismh777 wrote: So, be careful. I have had to separate *all* of my python installs on *every* one of my systems for this similar reason. The bottom line is if the distro ships with 2.6 (minus the idle) chances are that the interpreter is there *not* to

Re: how to inherit docstrings?

2011-06-10 Thread Steven D'Aprano
On Thu, 09 Jun 2011 23:59:08 -0400, Terry Reedy wrote: On 6/9/2011 9:12 PM, Carl Banks wrote: Presumably, the reason you are overriding a method in a subclass is to change its behavior; I'd expect an inherited docstring to be inaccurate more often than not. So I'd be -1 on automatically

Re: how to inherit docstrings?

2011-06-10 Thread Steven D'Aprano
On Thu, 09 Jun 2011 20:36:53 -0700, Carl Banks wrote: x = random.choice([Triange(),Square()]) print x.draw.__doc__ # prints Draws a shape Quick, what shape is x.draw() going to draw? That's easy... it will draw a type(x).__name__. I think this not a terribly convincing argument. I don't

Py2exe

2011-06-10 Thread poip
Hi Im new to this and I am having a problem converting my .py to a .exe I get the following: Traceback (most recent call last): File casemng.py, line 163, in module File casemng.py, line 38, in __init__ File wx\_core.pyc, line 3369, in ConvertToBitmap wx._core.PyAssertionError: C++

Unsupported operand type(s) for +: 'float' and 'tuple'

2011-06-10 Thread Francesc Segura
Hello all, I'm new to this and I'm having problems on summing two values at python. I get the following error: Traceback (most recent call last): File C:\edge-bc (2).py, line 168, in module if (costGG = cost + T0): TypeError: unsupported operand type(s) for +: 'float' and 'tuple' I'm

Unsupported operand type(s) for +: 'float' and 'tuple'

2011-06-10 Thread Francesc Segura
Hello all, I'm new to this and I'm having problems on summing two values at python. I get the following error: Traceback (most recent call last): File C:\edge-bc (2).py, line 168, in module if (costGG = cost + T0): TypeError: unsupported operand type(s) for +: 'float' and 'tuple' I'm

Re: how to inherit docstrings?

2011-06-10 Thread Tim Chase
On 06/09/2011 01:22 AM, Eric Snow wrote: Sometimes when using class inheritance, I want the overriding methods of the subclass to get the docstring of the matching method in the base class. You can do this with decorators (after the class definition), with class decorators, and with metaclasses

Re: Unsupported operand type(s) for +: 'float' and 'tuple'

2011-06-10 Thread Tim Chase
On 06/10/2011 05:30 AM, Francesc Segura wrote: Hello all, I'm new to this and I'm having problems on summing two values at python. I get the following error: Traceback (most recent call last): File C:\edge-bc (2).py, line 168, inmodule if (costGG= cost + T0): TypeError: unsupported

Kathryn Sokolich Spawned A Crook

2011-06-10 Thread Gary Sokolisch
Sure did http://www.manta.com/c/mmlq5dm/w-gary-sokolich W Gary Sokolich 801 Kings Road Newport Beach, CA 92663-5715 (949) 650-5379 http://www.tbpe.state.tx.us/da/da022808.htm TEXAS BOARD OF PROFESSIONAL ENGINEERS February 28, 2008 Board Meeting Disciplinary Actions W. Gary Sokolich ,

Re: Unsupported operand type(s) for +: 'float' and 'tuple'

2011-06-10 Thread Francesc Segura
On 10 jun, 13:38, Tim Chase python.l...@tim.thechases.com wrote: On 06/10/2011 05:30 AM, Francesc Segura wrote: Hello all, I'm new to this and I'm having problems on summing two values at python. I get the following error: Traceback (most recent call last):    File C:\edge-bc (2).py,

PyQt

2011-06-10 Thread KK
I have python 3.2 installed m not able to install PyQt. i have downloaded and configured sip but how to build it??? whats the make and make install given on the installation Plzzz help m a newbie to python -- http://mail.python.org/mailman/listinfo/python-list

Re: PyQt

2011-06-10 Thread Andrew Berg
On 2011.06.10 08:09 AM, KK wrote: I have python 3.2 installed m not able to install PyQt. i have downloaded and configured sip but how to build it??? The pages are misleading. You only need the SIP source if you want to build everything from source. Since you don't seem to be familiar with

Re: the stupid encoding problem to stdout

2011-06-10 Thread Sérgio Monteiro Basto
Ben Finney wrote: What should it decode to, then? UTF-8, as in tty But when you explicitly redirect to a file, it's not going to a TTY. It's going to a file whose encoding isn't known unless you specify it. ok after thinking about this, this problem exist because Python want be smart

Re: how to inherit docstrings?

2011-06-10 Thread Steven D'Aprano
On Thu, 09 Jun 2011 00:22:54 -0600, Eric Snow wrote: Sometimes when using class inheritance, I want the overriding methods of the subclass to get the docstring of the matching method in the base class. You can do this with decorators (after the class definition), with class decorators, and

Re: how to inherit docstrings?

2011-06-10 Thread Eric Snow
On Fri, Jun 10, 2011 at 5:05 AM, Tim Chase python.l...@tim.thechases.com wrote: On 06/09/2011 01:22 AM, Eric Snow wrote: Sometimes when using class inheritance, I want the overriding methods of the subclass to get the docstring of the matching method in the base class.  You can do this with

Re: the stupid encoding problem to stdout

2011-06-10 Thread Ian Kelly
2011/6/10 Sérgio Monteiro Basto sergi...@sapo.pt: ok after thinking about this, this problem exist because Python want be smart with ttys, which is in my point of view is wrong, should not encode to utf-8, because tty is in utf-8. Python should always encode to the same thing. If the default

Re: how to inherit docstrings?

2011-06-10 Thread Eric Snow
On Fri, Jun 10, 2011 at 10:47 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Here's some Python 3 code that uses a factory function as a metaclass to inherit docstrings. Give the class a docstring of an empty string, and it will be inherited from the first superclass found with

Re: how to inherit docstrings?

2011-06-10 Thread Steven D'Aprano
On Fri, 10 Jun 2011 16:47:03 +, Steven D'Aprano wrote: On Thu, 09 Jun 2011 00:22:54 -0600, Eric Snow wrote: Sometimes when using class inheritance, I want the overriding methods of the subclass to get the docstring of the matching method in the base class. You can do this with

Question About Command line arguments

2011-06-10 Thread Mark Phillips
I have a script that processes command line arguments def main(argv=None): syslog.syslog(Sparkler stared processing) if argv is None: argv = sys.argv if len(argv) != 2: syslog.syslog(usage()) else: r = parseMsg(sys.argv[1]) syslog.syslog(r)

Re: how to inherit docstrings?

2011-06-10 Thread Ian Kelly
On Fri, Jun 10, 2011 at 10:55 AM, Eric Snow ericsnowcurren...@gmail.com wrote: The only problem, as seen in the last line, is that the __doc__ on instances is not inherited on instances of the class.  Object attribute lookup only looks to the type's __dict__ for inheritance, and not the

Re: how to inherit docstrings?

2011-06-10 Thread Steven D'Aprano
On Fri, 10 Jun 2011 11:01:41 -0600, Eric Snow wrote: On Fri, Jun 10, 2011 at 10:47 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Here's some Python 3 code that uses a factory function as a metaclass to inherit docstrings. Give the class a docstring of an empty string, and

Re: Question About Command line arguments

2011-06-10 Thread MRAB
On 10/06/2011 18:21, Mark Phillips wrote: I have a script that processes command line arguments def main(argv=None): syslog.syslog(Sparkler stared processing) if argv is None: argv = sys.argv if len(argv) != 2: syslog.syslog(usage()) else: r =

Re: Question About Command line arguments

2011-06-10 Thread Mark Phillips
On Fri, Jun 10, 2011 at 10:41 AM, MRAB pyt...@mrabarnett.plus.com wrote: On 10/06/2011 18:21, Mark Phillips wrote: I have a script that processes command line arguments def main(argv=None): syslog.syslog(Sparkler stared processing) if argv is None: argv = sys.argv if

uhmm... your chance to spit on me

2011-06-10 Thread Xah Lee
Dear lisp comrades, it's Friday! Dear Xah, your writing is: • Full of bad grammar. River of Hiccups. • Stilted. Chocked under useless structure and logic. • WRONG — Filled with uncouth advices. • Needlessly insulting. You have problems. • Simply stinks. Worthless. •

Re: Question About Command line arguments

2011-06-10 Thread Kurt Smith
On Fri, Jun 10, 2011 at 12:58 PM, Mark Phillips m...@phillipsmarketing.biz wrote: How do I write my script so it picks up argument from the output of commands that pipe input into my script? def main(): import sys print sys.stdin.read() if __name__ == '__main__': main() $ echo

Re: Question About Command line arguments

2011-06-10 Thread Dennis
On Fri, Jun 10, 2011 at 11:03 AM, Dennis daoden...@gmail.com wrote: On Fri, Jun 10, 2011 at 10:58 AM, Mark Phillips m...@phillipsmarketing.biz wrote: On Fri, Jun 10, 2011 at 10:41 AM, MRAB pyt...@mrabarnett.plus.com wrote: On 10/06/2011 18:21, Mark Phillips wrote: How do I write my script

Re: Question About Command line arguments

2011-06-10 Thread Tim Chase
On 06/10/2011 12:58 PM, Mark Phillips wrote: How do I write my script so it picks up argument from the output of commands that pipe input into my script? You can check if os.isatty(sys.stdin): # -- this check do_stuff_with_the_terminal() else: read_options_from_stdin() -tkc

Re: how to inherit docstrings?

2011-06-10 Thread Eric Snow
FYI, I started this topic up on python-ideas, as it seemed valid enough from the responses I've gotten here [1]. -eric [1] http://mail.python.org/pipermail/python-ideas/2011-June/010473.html -- http://mail.python.org/mailman/listinfo/python-list

Re: how to inherit docstrings?

2011-06-10 Thread Eric Snow
On Fri, Jun 10, 2011 at 11:26 AM, Ian Kelly ian.g.ke...@gmail.com wrote: Everybody always focuses so much on properties and forgets that you can also just write your own descriptors. I'm so glad that you pointed this out. I totally forgot that properties simply returned themselves if not

Re: Question About Command line arguments

2011-06-10 Thread Mark Phillips
On Fri, Jun 10, 2011 at 11:03 AM, Kurt Smith kwmsm...@gmail.com wrote: On Fri, Jun 10, 2011 at 12:58 PM, Mark Phillips m...@phillipsmarketing.biz wrote: How do I write my script so it picks up argument from the output of commands that pipe input into my script? def main(): import sys

Re: The Forthcoder Diaries -- 2011 June 9

2011-06-10 Thread Mentifex
On Jun 10, 5:15 am, Brian Martin briannos...@futuresoftware.com.auNOSPAM wrote: Then again you could use a high level language like Perl, Python, APL ... On 10/06/2011 8:17 AM, Paul Rubin wrote: Mentifexmenti...@myuw.net  writes: At one point, I had to create 8jun11T.F as a Test version of

Re: PyQt

2011-06-10 Thread KK
Thanks for the reply!! i ve installed the binary but when i import anything of PyQt in my prog it says error?? i think there is some problem with folders -- http://mail.python.org/mailman/listinfo/python-list

Re: Question About Command line arguments

2011-06-10 Thread Robert Kern
On 6/10/11 12:58 PM, Mark Phillips wrote: On Fri, Jun 10, 2011 at 10:41 AM, MRAB pyt...@mrabarnett.plus.com mailto:pyt...@mrabarnett.plus.com wrote: On 10/06/2011 18:21, Mark Phillips wrote: I have a script that processes command line arguments def main(argv=None):

Re: Question About Command line arguments

2011-06-10 Thread Benjamin Kaplan
On Jun 10, 2011 10:26 AM, Mark Phillips m...@phillipsmarketing.biz wrote: I have a script that processes command line arguments def main(argv=None): syslog.syslog(Sparkler stared processing) if argv is None: argv = sys.argv if len(argv) != 2:

parallel computations: subprocess.Popen(...).communicate()[0] does not work with multiprocessing.Pool

2011-06-10 Thread Hseu-Ming Chen
Hi, I am having an issue when making a shell call from within a multiprocessing.Process(). Here is the story: i tried to parallelize the computations in 800-ish Matlab scripts and then save the results to MySQL. The non-parallel/serial version has been running fine for about 2 years. However,

Re: Question About Command line arguments

2011-06-10 Thread Dennis
On Fri, Jun 10, 2011 at 11:58 AM, Mark Phillips m...@phillipsmarketing.biz wrote: \ Kurt, How does one write a main method to handle both command line args and stdin args? Here is what I came up with: The one weird thing, the line from above didn't seem to work so I changed it if

Re: Question About Command line arguments

2011-06-10 Thread Dennis
On Fri, Jun 10, 2011 at 1:33 PM, Dennis daoden...@gmail.com wrote: On Fri, Jun 10, 2011 at 11:58 AM, Mark Phillips fred ['alice'] fred Just realized the if/else will have to be changed slightly if we want to output both argv and stdin. -- http://mail.python.org/mailman/listinfo/python-list

Help with a piping error

2011-06-10 Thread virdo
Hi, I'm getting the following error and I can't Google my way out of it: close failed in file object destructor: sys.excepthook is missing lost sys.stderr My python file is simple print test. I run it, it works no problem. I pipe the output to a file run logfile and that's the error I get.

Re: Help with a piping error

2011-06-10 Thread John Gordon
In 6e035898-8938-4a61-91de-7a0ea7ead...@y30g2000yqb.googlegroups.com virdo vir...@gmail.com writes: My python file is simple print test. I run it, it works no problem. I pipe the output to a file run logfile and that's the error I get. This is with Windows Server 2008 (64 bit) using

Re: Help with a piping error

2011-06-10 Thread virdo
On Jun 10, 4:48 pm, John Gordon gor...@panix.com wrote: In 6e035898-8938-4a61-91de-7a0ea7ead...@y30g2000yqb.googlegroups.com virdo vir...@gmail.com writes: My python file is simple print test. I run it, it works no problem. I pipe the output to a file run logfile and that's the error I

Re: Question About Command line arguments

2011-06-10 Thread Benjamin Kaplan
On Fri, Jun 10, 2011 at 11:31 AM, Tim Chase python.l...@tim.thechases.com wrote: On 06/10/2011 12:58 PM, Mark Phillips wrote: How do I write my script so it picks up argument from the output of commands that pipe input into my script? You can check  if os.isatty(sys.stdin):  # -- this

Re: PyQt

2011-06-10 Thread Benjamin Kaplan
On Fri, Jun 10, 2011 at 12:15 PM, KK kunalkapadi...@gmail.com wrote: Thanks for the reply!! i ve installed the binary but when i import anything of PyQt in my prog it says error?? i think there is some problem with folders What is the exact text of the error message? We can't

Re: Question About Command line arguments

2011-06-10 Thread Tim Chase
On 06/10/2011 04:00 PM, Benjamin Kaplan wrote: On Fri, Jun 10, 2011 at 11:31 AM, Tim Chase if os.isatty(sys.stdin): #-- this check Any reason for that over sys.stdin.isatty()? my knowledge of os.isatty() existing and my previous lack of knowledge about sys.stdin.isatty() :) -tkc

Re: how to inherit docstrings?

2011-06-10 Thread Carl Banks
On Thursday, June 9, 2011 10:18:34 PM UTC-7, Ben Finney wrote: [snip example where programmer is expected to consult class docstring to infer what a method does] There's nothing wrong with the docstring for a method referring to the context within which the method is defined. Whenever

Re: how to inherit docstrings?

2011-06-10 Thread Carl Banks
On Friday, June 10, 2011 2:51:20 AM UTC-7, Steven D#39;Aprano wrote: On Thu, 09 Jun 2011 20:36:53 -0700, Carl Banks wrote: Put it this way: if Python doesn't automatically inherit docstrings, the worst that can happen is missing information. If Python does inherit docstrings, it can lead

Re: Help with a piping error

2011-06-10 Thread Hans Mulder
On 10/06/11 22:56:06, virdo wrote: On Jun 10, 4:48 pm, John Gordongor...@panix.com wrote: In6e035898-8938-4a61-91de-7a0ea7ead...@y30g2000yqb.googlegroups.com virdovir...@gmail.com writes: My python file is simple print test. I run it, it works no problem. I pipe the output to a file run

Re: Question About Command line arguments

2011-06-10 Thread Hans Mulder
On 10/06/11 20:03:44, Kurt Smith wrote: On Fri, Jun 10, 2011 at 12:58 PM, Mark Phillips m...@phillipsmarketing.biz wrote: How do I write my script so it picks up argument from the output of commands that pipe input into my script? def main(): import sys print sys.stdin.read() if

Re: the stupid encoding problem to stdout

2011-06-10 Thread Chris Angelico
2011/6/11 Sérgio Monteiro Basto sergi...@sapo.pt: ok after thinking about this, this problem exist because Python want be smart with ttys The *anomaly* (not problem) exists because Python has a way of being told a target encoding. If two parties agree on an encoding, they can send characters to

Help for chimera

2011-06-10 Thread Chinmaya Rajiv Joshi
Hello, I am trying to create a movie in chimera UCSF using the python scripts. I want to take an input of certain images, rotate, translate, etc and make a movie out of them all through the command line. So if I were give a series of images from a matlab code, my script would generate a video

Re: Help with a piping error

2011-06-10 Thread virdo
On Jun 10, 5:56 pm, Hans Mulder han...@xs4all.nl wrote: On 10/06/11 22:56:06, virdo wrote: On Jun 10, 4:48 pm, John Gordongor...@panix.com  wrote: In6e035898-8938-4a61-91de-7a0ea7ead...@y30g2000yqb.googlegroups.com   virdovir...@gmail.com  writes: My python file is simple print

Re: help on QUICKFIX

2011-06-10 Thread Gabriel Genellina
En Fri, 10 Jun 2011 04:13:05 -0300, prakash jp prakash.st...@gmail.com escribió: I am using quickfix, would like to start with that ..\quickfix-1.13.3\quickfix\examples\executor\python\executor.py asks for a configuration file how should it look like. This one?

Re: Function declarations ?

2011-06-10 Thread Asen Bozhilov
Andre Majorel wrote: Is there a way to keep the definitions of the high-level functions at the top of the source ? I don't see a way to declare a function in Python. I am not a Python developer, but Pythonic way of definition not declaration is definitely interesting. Languages with variable

ContextDecorator via contextmanager: broken?

2011-06-10 Thread Ian Kelly
Python 3.2 has this lovely new contextlib.ContextDecorator mixin [1] for context manager classes that allows you to apply the context manager as a decorator. The docs for this feature include the note: ContextDecorator is used by contextmanager(), so you get this functionality automatically.

Re: ContextDecorator via contextmanager: broken?

2011-06-10 Thread Ian Kelly
On Fri, Jun 10, 2011 at 4:57 PM, Ian Kelly ian.g.ke...@gmail.com wrote: So as far as I can tell, generator-based context managers simply can't be used as ContextDecorators.  Furthermore, the documentation's claim that they can is actually harmful, since they *appear* to work at first.  Or am I

Re: how to inherit docstrings?

2011-06-10 Thread Eric Snow
On Thu, Jun 9, 2011 at 12:22 AM, Eric Snow ericsnowcurren...@gmail.com wrote: Sometimes when using class inheritance, I want the overriding methods of the subclass to get the docstring of the matching method in the base class.  You can do this with decorators (after the class definition), with

Re: best book about Webdesign with Django

2011-06-10 Thread News123
Hi Thomas, APologies for not being clear enough in my question. On 06/09/2011 04:40 PM, Thomas Guettler wrote: On 08.06.2011 12:29, News123 wrote: Hi, Do you have any recommendations for a good book about Web design with Django? You can do web design with HTML, CSS and Javascript.

Re: uhmm... your chance to spit on me

2011-06-10 Thread Jim Burton
Xah Lee xah...@gmail.com writes: Dear lisp comrades, it's Friday! The answers to your question give poor coverage of the possible responses to your writing. I myself enjoy reading what you write, most of the time, but become bored and fed up with the way you sometimes seem unaccountably angry

Re: Unsupported operand type(s) for +: 'float' and 'tuple'

2011-06-10 Thread Gabriel Genellina
En Fri, 10 Jun 2011 07:30:28 -0300, Francesc Segura frseg...@gmail.com escribió: Hello all, I'm new to this and I'm having problems on summing two values at python. I get the following error: Traceback (most recent call last): File C:\edge-bc (2).py, line 168, in module if (costGG =

Re: Unsupported operand type(s) for +: 'float' and 'tuple'

2011-06-10 Thread Gabriel Genellina
En Fri, 10 Jun 2011 07:30:28 -0300, Francesc Segura frseg...@gmail.com escribió: Hello all, I'm new to this and I'm having problems on summing two values at python. I get the following error: Traceback (most recent call last): File C:\edge-bc (2).py, line 168, in module if (costGG =

Re: __doc__ immutable for classes

2011-06-10 Thread Terry Reedy
On 6/10/2011 3:31 AM, Gregory Ewing wrote: Eric Snow wrote: But for method objects (really a wrapper for bound functions) would it change the __doc__ of the wrapper or of the bound function? You probably wouldn't want to change the __doc__ of a method wrapper; instead you'd make sure you got

Re: best book about Webdesign with Django

2011-06-10 Thread Zachary Dziura
I found that Head First Python gives a really good introduction to Django. It's definitely a beginners book, as are all of the Head First books, but it still teaches the basics in a very good manner. If you're very knowledgeable with Python, you can skip the first few chapters (or read through

Re: PyQt

2011-06-10 Thread Terry Reedy
On 6/10/2011 3:15 PM, KK wrote: Thanks for the reply!! i ve installed the binary but when i import anything of PyQt in my prog it says error?? i think there is some problem with folders If you install in python32/Lib/site-packages, it should work. But see Andrew's message. Show

Re: Unsupported operand type(s) for +: 'float' and 'tuple'

2011-06-10 Thread Terry Reedy
On 6/10/2011 6:30 AM, Francesc Segura wrote: Hello all, I'm new to this and I'm having problems on summing two values at python. I get the following error: Traceback (most recent call last): File C:\edge-bc (2).py, line 168, inmodule if (costGG= cost + T0): TypeError: unsupported

Re: how to inherit docstrings?

2011-06-10 Thread Steven D'Aprano
On Fri, 10 Jun 2011 14:46:06 -0700, Carl Banks wrote: On Friday, June 10, 2011 2:51:20 AM UTC-7, Steven D#39;Aprano wrote: On Thu, 09 Jun 2011 20:36:53 -0700, Carl Banks wrote: Put it this way: if Python doesn't automatically inherit docstrings, the worst that can happen is missing

i want to learn pyqt ,but i have no c++ knowlage. is it ok????

2011-06-10 Thread 可乐
i want to learn pyqt ,but i have no c++ knowlage. is it ok -- http://mail.python.org/mailman/listinfo/python-list

Recursion error in metaclass

2011-06-10 Thread Steven D'Aprano
I have a metaclass in Python 3.1: class MC1(type): @staticmethod def get_mro(bases): print('get_mro called') return type('K', bases, {}).__mro__[1:] def __new__(cls, name, bases, dict): mro = None docstring = dict.get('__doc__') if docstring ==

[no subject]

2011-06-10 Thread burl rollinlife
Íàì, ãîâîðèò, î÷åíü ïðèÿòíî, è íàì íóæíû îáðàçîâàííûå Îíè íå ïðîñ÷èòàþò Âû, ãîâîðèò, òîæå, êàæåòñÿ, ïî êîììåð÷åñêîé ÷àñòè?http://rayjonz8231.de.tl/esp1006nimfia.htm -- http://mail.python.org/mailman/listinfo/python-list

Re: i want to learn pyqt ,but i have no c++ knowlage. is it ok????

2011-06-10 Thread Javier
?? joyche...@gmail.com wrote: i want to learn pyqt ,but i have no c++ knowlage. is it ok It should be ok. I would recoomend this book: Rapid GUI Programming with Python and Qt (Prentice Hall Open Source Software Development) Mark Summerfield (Author) --

Re: i want to learn pyqt ,but i have no c++ knowlage. is it ok????

2011-06-10 Thread 可乐
On 6月11日, 下午12时03分, Javier nos...@nospam.com wrote: ?? joyche...@gmail.com wrote: i want to learn pyqt ,but i have no c++ knowlage. is it ok It should be ok. I would recoomend this book: Rapid GUI Programming with Python and Qt (Prentice Hall Open Source Software Development)

(*args **kwargs) how do I use' em?

2011-06-10 Thread TheSaint
Hello, I'm seldomly writng python code, nothing but a beginner code. I wrote these lines = _log_in= mhandler.ConnectHandler(lmbox, _logger, accs) multhr= sttng['multithread'] if multhr: _log_in= mhandler.mThreadSession(lmbox,

Re: i want to learn pyqt ,but i have no c++ knowlage. is it ok????

2011-06-10 Thread Dennis
2011/6/10 可乐 joyche...@gmail.com: On 6月11日, 下午12时03分, Javier nos...@nospam.com wrote: ?? joyche...@gmail.com wrote: i want to learn pyqt ,but i have no c++ knowlage. is it ok It should be ok. I would recoomend this book: Rapid GUI Programming with Python and Qt (Prentice Hall Open

Re: Recursion error in metaclass

2011-06-10 Thread Terry Reedy
On 6/10/2011 11:34 PM, Steven D'Aprano wrote: I have a metaclass in Python 3.1: class MC1(type): @staticmethod def get_mro(bases): print('get_mro called') return type('K', bases, {}).__mro__[1:] The call to type figures out the proper metaclass from bases and

[issue12307] Inconsistent formatting of section titles in PEP 0

2011-06-10 Thread Eric Snow
New submission from Eric Snow ericsnowcurren...@gmail.com: The formatting for the title of the Index by Category section is different from the formatting for the title of the Numerical Index section. Not sure if there is a reason behind this, but here's a patch: diff --git a/pep0/output.py

[issue9344] please add posix.getgrouplist()

2011-06-10 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: Thanks! -- resolution: - accepted stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9344

[issue12308] Add link to PEP 0 for topical index in wiki

2011-06-10 Thread Eric Snow
New submission from Eric Snow ericsnowcurren...@gmail.com: A couple of months back I started a page on the wiki for a topical index of PEPs from PEP 0 [1]. I got tired of reading through PEPs trying to see if one related to what I was working on. I found myself wishing there was a topical

[issue12273] Change ast.__version__ calculation to provide consistent ordering

2011-06-10 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: sys.version_info and sys._mercurial provide all the info needed for someone (like me for mnfy) to know if their code will work against the AST nodes used by the running interpreter. I say drop __version__. --

[issue12304] expose signalfd(2) in the signal module

2011-06-10 Thread Nadeem Vawda
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12304 ___ ___

[issue12306] zlib: Expose zlibVersion to query runtime version of zlib

2011-06-10 Thread Nadeem Vawda
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12306 ___ ___

[issue1294232] Error in metaclass search order

2011-06-10 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- assignee: - ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1294232 ___ ___

[issue12223] Datamodel documentation page: 'operator' where 'operand' should be

2011-06-10 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: From a cursory look at reference/datamodel and library/operator, I see no other instances of this error. I didn't read every word, however (just grepped for possible operator/operand mismatches). Also, AFAICS this error is only in 2.7 - the

[issue12223] Datamodel documentation page: 'operator' where 'operand' should be

2011-06-10 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 3bb5400f5bea by Eli Bendersky in branch '2.7': Issue #12223: Typo fix in datamodel docs http://hg.python.org/cpython/rev/3bb5400f5bea -- nosy: +python-dev ___ Python tracker

[issue11898] Sending binary data with a POST request in httplib can cause Unicode exceptions

2011-06-10 Thread Ion Scerbatiuc
Ion Scerbatiuc delinha...@gmail.com added the comment: Hello, I would like to subscribe to the issue. The problem seems to indeed exist in Python 2.7. What I'm doing is to proxy HTTP requests (using Django) and the PUT / POST requests are working fine on Python 2.6 but are failing on 2.7

[issue8407] expose pthread_sigmask(), pthread_kill(), sigpending() and sigwait() in the signal module

2011-06-10 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: On Linux, it works well with more than one thread. I added a test using a thread, we will see if it works on buildbots. The test hangs on FreeBSD 8.2: [235/356] test_signal Timeout (1:00:00)! Thread 0x000800e041c0: File

  1   2   3   >