how to inherit docstrings?

2011-06-09 Thread Eric Snow
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 [1]. However, I was hoping for a way to

Re: how to inherit docstrings?

2011-06-09 Thread Ben Finney
Eric Snow ericsnowcurren...@gmail.com writes: p.s. Am I missing something or can you really not change the docstring of a class? I was thinking about the idea of inheriting class docstrings too. The docstring of an object (whether function or class or module) is the object's ‘__doc__’

ANN: GMPY2 or How I learned to love nan

2011-06-09 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. GMPY2 alpha2 introduces context manager support for MPFR arithmetic. It's now possible to trigger an exception when comparing against nan (and other for

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

2011-06-09 Thread Larry Hudson
On 06/08/2011 01:09 PM, Cathy James wrote: I am almost there, but I need a little help: I would like to a) print my dogs in the format index. name: breed as follows: 0. Mimi:Poodle 1.Sunny: Beagle 2. Bunny: German Shepard I am getting (0, ('Mimi', 'Poodle')) . Mimi : Poodle instead-what

Re: how to inherit docstrings?

2011-06-09 Thread Eric Snow
On Thu, Jun 9, 2011 at 12:37 AM, Ben Finney ben+pyt...@benfinney.id.au wrote: Eric Snow ericsnowcurren...@gmail.com writes: p.s. Am I missing something or can you really not change the docstring of a class? I was thinking about the idea of inheriting class docstrings too. The docstring of

Re: how to inherit docstrings?

2011-06-09 Thread Carl Banks
On Thursday, June 9, 2011 12:13:06 AM UTC-7, Eric Snow wrote: On Thu, Jun 9, 2011 at 12:37 AM, Ben Finney ben+p...@benfinney.id.au wrote: So, it's even possible to do what you ask without decorators at all:    class Foo(object):        def frob(self):             Frobnicate thyself.

Re: how to inherit docstrings?

2011-06-09 Thread Ben Finney
Eric Snow ericsnowcurren...@gmail.com writes: AttributeError: attribute '__doc__' of 'type' objects is not writable That is on 3.3. Well, that sucks :-( Where can we see the discussion of that change before it was implemented? I'm just looking for a way to do it with decorators in the

Any Better logic for this problem..

2011-06-09 Thread Ganapathy Subramanium
Hi Guru's, I'm working on a solution to find the prime factor of the number This part of the code works.. http://www.pastie.org/2041584 When the number gets bigger, the range cannot iterate through bigger number and it does not work. When I googled , I came across creating our own range

Re: Any Better logic for this problem..

2011-06-09 Thread Chris Rebert
On Thu, Jun 9, 2011 at 1:31 AM, Ganapathy Subramanium sganapathy.subraman...@gmail.com wrote: Hi Guru's, I'm working on a solution to find the prime factor of the number This part of the code works.. http://www.pastie.org/2041584 For the archives, that code is: num = 13195 #num =

Re: Any Better logic for this problem..

2011-06-09 Thread Ian
On 09/06/2011 09:31, Ganapathy Subramanium wrote: Hi Guru's, I'm working on a solution to find the prime factor of the number This part of the code works.. http://www.pastie.org/2041584 When the number gets bigger, the range cannot iterate through bigger number and it does not work. When I

Re: Any Better logic for this problem..

2011-06-09 Thread Chris Angelico
On Thu, Jun 9, 2011 at 7:06 PM, Chris Rebert c...@rebertia.com wrote: On Thu, Jun 9, 2011 at 1:31 AM, Ganapathy Subramanium sganapathy.subraman...@gmail.com wrote: Hi Guru's, I'm working on a solution to find the prime factor of the number This part of the code works.. 

Re: test_popen

2011-06-09 Thread Dave Angel
On 01/-10/-28163 02:59 PM, harrismh777 wrote: Looks like my 2.7 test_popen failure is an open issue7671... since Jan 2010. Looks like it really does function ok. At any rate, I was able to test Popen myself today, and it ran fine. I needed to write a script that will disable the touch pad on

Re: how to inherit docstrings?

2011-06-09 Thread Duncan Booth
Ben Finney ben+pyt...@benfinney.id.au wrote: Eric Snow ericsnowcurren...@gmail.com writes: AttributeError: attribute '__doc__' of 'type' objects is not writable That is on 3.3. Well, that sucks :-( Where can we see the discussion of that change before it was implemented? Change?

Re: smtp - python

2011-06-09 Thread Adam Tauno Williams
On Wed, 2011-06-08 at 17:18 -0300, Josias L.G wrote: Hi for all, I'm very newbie in python and is very good language. I'm trying to adopt a example: import smtpd import asyncore server = smtpd.PureProxy(('127.0.0.1', 1025), ('mail', 25)) asyncore.loop() I'm trying to copy the email that is

Investing in data management services could have vast benefits

2011-06-09 Thread waner
If your business has huge databases of client details and other information, maintenance these records as accurate and current as possible should be a top priority, learn more http://worldupdateinformation.com/2011/06/08/investing-in-data-management-services-could-have-vast-benefits/ --

Re: Any Better logic for this problem..

2011-06-09 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Chris Rebert wrote: On Thu, Jun 9, 2011 at 1:31 AM, Ganapathy Subramanium sganapathy.subraman...@gmail.com wrote: Hi Guru's, I'm working on a solution to find the prime factor of the number This part of the code works.. http://www.pastie.org/2041584 For the

Re: The pythonic way equal to whoami

2011-06-09 Thread TheSaint
Christopher Head wrote: It is. Until Linux capabilities, EUID==0 used to be special-cased in the kernel Thank you all, I got a good learning *and* something to rememeber. -- goto /dev/null -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems Compiling Python 2.6.7 for Win7

2011-06-09 Thread Jay Osako
On Jun 8, 6:56 pm, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Wed, 08 Jun 2011 12:28:56 -0300, Jay Osako josephos...@gmail.com   escribi : I have been trying to get PyODBC to work with Python 2.6 (the latest version it is known to be compatible with) and Django, but have run into

Iterating into maildir or mbox

2011-06-09 Thread TheSaint
Hello, originally with python 2.4 ~ 2.7 (I think) iterating a maildir I was using ++Code+ try: mbox= mailbox.PortableUnixMailbox(open(mbox,'r')) except IOError: # if file not found default is None mbox= None while mbox:

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

2011-06-09 Thread Ethan Furman
Larry Hudson wrote: On 06/08/2011 01:09 PM, Cathy James wrote: Dog Breed: )) while not dogs: print(Goodbye!!) sys.exit() else: else does not belong with while. else works just fine with while; it is the path taken when the while is exhausted, but not broken out

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

2011-06-09 Thread Ethan Furman
Ethan Furman wrote: Larry Hudson wrote: On 06/08/2011 01:09 PM, Cathy James wrote: Dog Breed: )) while not dogs: print(Goodbye!!) sys.exit() else: else does not belong with while. else works just fine with while; it is the path taken when the while is

Re: best book about Webdesign with Django

2011-06-09 Thread Thomas Guettler
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. There are a lot of books about this. Django is a good web framework. It does not care much about CSS and Javascript.

Gnumeric scripting and license

2011-06-09 Thread Bhushit Joshipura
I am looking for some information about Gnumeric scripting licensing. Here is my question: If I script for Gnumeric using Python, must I release the script code? I am unable to draw a line where Gnumeric GPL ends and where proprietary nature of macros start. Thanks in advance, -Bhushit --

Re: how to inherit docstrings?

2011-06-09 Thread Steven D'Aprano
On Thu, 09 Jun 2011 17:44:32 +1000, Ben Finney wrote: Eric Snow ericsnowcurren...@gmail.com writes: AttributeError: attribute '__doc__' of 'type' objects is not writable That is on 3.3. Well, that sucks :-( Where can we see the discussion of that change before it was implemented? It

Re: how to inherit docstrings?

2011-06-09 Thread Ethan Furman
Eric Snow wrote: p.s. Am I missing something or can you really not change the docstring of a class? I was thinking about the idea of inheriting class docstrings too. 8 module level docstring def func(): function level docstring

Re: pexpect and OpenVMS

2011-06-09 Thread Mark Franklin
I ran into a similar problem. I found throttling self.sh.delaybeforesend works for me. I'm on ubuntu. -- http://mail.python.org/mailman/listinfo/python-list

Python 2.6 OR 3.2

2011-06-09 Thread hisan
Hi All, Please let me know which one is GOOD whether Python 2.6 OR 3.2. Please let me know the difference between them. Please give some refernce site or books to know the difference -- http://mail.python.org/mailman/listinfo/python-list

Re: Import error while running python application on Mac OS

2011-06-09 Thread hisan
On Jun 8, 9:20 pm, hisan santosh.s...@gmail.com wrote: HI All, I have created an application for Mac OS using py2app module, in my python script i have external modules such as MySQLdb and other , while trying to run on Mac OS i get an error saying unable to import the module MySQLdb. On

Re: Python 2.6 OR 3.2

2011-06-09 Thread John Gordon
In 9037ef5f-53c5-42c6-ac5d-8f942df6c...@x38g2000pri.googlegroups.com hisan santosh.s...@gmail.com writes: Hi All, Please let me know which one is GOOD whether Python 2.6 OR 3.2. Please let me know the difference between them. Please give some refernce site or books to know the difference

Re: Paramiko Threading Error

2011-06-09 Thread David
Il Tue, 7 Jun 2011 19:25:43 -0700 (PDT), mud ha scritto: Hi All, Does anybody know what the following error means with paramiko, and how to fix it. I don't know what is causing it and why. I have updated paramiko to version 1.7.7.1 (George) but still has the same issue. Also I can not

Re: Any Better logic for this problem..

2011-06-09 Thread geremy condra
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 AM, Ganapathy Subramanium sganapathy.subraman...@gmail.com  wrote: Hi Guru's, I'm working on a solution to find the prime factor of the number This

urllib2 opendirector versus request object

2011-06-09 Thread Dennis
Hi, I was wondering what the difference or advantages to using an opendirector with handlers or using a request object? I am having an issue where when I use the open director and I try to add headers it adds them after the connection-close header, but when I use the request object it does not.

Re: Import error while running python application on Mac OS

2011-06-09 Thread Ned Deily
In article 1167f414-8901-4f9c-9d51-2723213fd...@k3g2000prl.googlegroups.com, hisan santosh.s...@gmail.com wrote: On Jun 8, 9:20 pm, hisan santosh.s...@gmail.com wrote: I have created an application for Mac OS using py2app module, in my python script i have external modules such as MySQLdb

Re: Python 2.6 OR 3.2

2011-06-09 Thread Corey Richardson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/09/2011 01:18 PM, hisan wrote: Hi All, Please let me know which one is GOOD whether Python 2.6 OR 3.2. Please let me know the difference between them. Please give some refernce site or books to know the difference

Re: Eigensolver for Large Sparse Matrices in Python

2011-06-09 Thread Javier
Hi, I think you can also use scipy.sparse.linalg.eigen.arpack in addition to scipy.sparse.linalg.eigen.lobpcg Also, from my experience with this routines I can tell you that they don't like to be asked a small number of eigenvalues. Contrary to common sense I have found these routines to prefer

JSONBOT 0.7.1 released

2011-06-09 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

Re: the stupid encoding problem to stdout

2011-06-09 Thread Sérgio Monteiro Basto
Benjamin Kaplan wrote: 2011/6/8 Sérgio Monteiro Basto sergi...@sapo.pt: 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 ./test.py output.txt Traceback (most recent call

Re: the stupid encoding problem to stdout

2011-06-09 Thread Sérgio Monteiro Basto
Ben Finney wrote: Sérgio Monteiro Basto sergi...@sapo.pt writes: ./test.py moçambique moçambique In this case your terminal is reporting its encoding to Python, and it's capable of taking the UTF-8 data that you send to it in both cases. ./test.py output.txt Traceback (most recent

[JOB] Python Programmer, Newport Beach, CA | 6-24 months - Relo OK

2011-06-09 Thread PHP Recruiter
This is a contract/hourly 6-24 month on-site Python Programming job located in Newport Beach, CA paying $50.00 to $80.00 per hour depending on experience. Local candidates preferred, but all considered. Relocation expenses covered. Our Newport Beach, CA client is seeking a Python programmer

Re: Gnumeric scripting and license

2011-06-09 Thread Ben Finney
Bhushit Joshipura joship...@gmail.com writes: I am looking for some information about Gnumeric scripting licensing. You're asking in the wrong place; that's a question for the authors of the GPL, and for the copyright holders in Gnumeric. The authors of the GPL have an FAQ document you will

Re: how to inherit docstrings?

2011-06-09 Thread Ben Finney
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: On Thu, 09 Jun 2011 17:44:32 +1000, Ben Finney wrote: Eric Snow ericsnowcurren...@gmail.com writes: AttributeError: attribute '__doc__' of 'type' objects is not writable That is on 3.3. Well, that sucks :-( Where

Re: the stupid encoding problem to stdout

2011-06-09 Thread Nobody
On Thu, 09 Jun 2011 22:14:17 +0100, Sérgio Monteiro Basto wrote: Exactly the opposite , if python don't know the encoding should not try decode to ASCII. What should it decode to, then? You can't write characters to a stream, only bytes. I want python don't care about encoding terminal and

Re: Gnumeric scripting and license

2011-06-09 Thread Chris Angelico
On Fri, Jun 10, 2011 at 12:47 AM, Bhushit Joshipura joship...@gmail.com wrote: I am looking for some information about Gnumeric scripting licensing. Here is my question: If I script for Gnumeric using Python, must I release the script code? I am unable to draw a line where Gnumeric GPL ends

Re: how to inherit docstrings?

2011-06-09 Thread Gregory Ewing
IMO, it shouldn't be necessary to explicitly copy docstrings around like this in the first place. Either it should happen automatically, or help() should be smart enough to look up the inheritance hierarchy when given a method that doesn't have a docstring of its own. Unfortunately, since

Re: Any Better logic for this problem..

2011-06-09 Thread Gregory Ewing
Chris Angelico wrote: Rather than find all prime numbers up to num, stop at sqrt(num) - it's not possible to have any prime factors larger than that. That's not quite true -- the prime factors of 26 are 2 and 13, and 13 is clearly greater than sqrt(26). However, once you've divided out all

Re: Any Better logic for this problem..

2011-06-09 Thread Chris Angelico
On Fri, Jun 10, 2011 at 8:39 AM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Chris Angelico wrote: Rather than find all prime numbers up to num, stop at sqrt(num) - it's not possible to have any prime factors larger than that. That's not quite true -- the prime factors of 26 are 2 and

Re: Python 2.6 OR 3.2

2011-06-09 Thread Chris Angelico
On Fri, Jun 10, 2011 at 3:18 AM, hisan santosh.s...@gmail.com wrote: Hi All, Please let me know which one is GOOD whether Python 2.6 OR 3.2. As a side point, you should probably use 2.7 rather than 2.6. With regard to 2.x versus 3.x, Corey already posted a link to an excellent article. Chris

Re: how to inherit docstrings?

2011-06-09 Thread Eric Snow
On Thu, Jun 9, 2011 at 4:27 PM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: IMO, it shouldn't be necessary to explicitly copy docstrings around like this in the first place. Either it should happen automatically, or help() should be smart enough to look up the inheritance hierarchy when

Re: the stupid encoding problem to stdout

2011-06-09 Thread Ben Finney
Sérgio Monteiro Basto sergi...@sapo.pt writes: Ben Finney wrote: In this case your shell has no preference for the encoding (since you're redirecting output to a file). How I say to python that I want that write in utf-8 to files ? You already did: In the first print statement you

Re: how to inherit docstrings?

2011-06-09 Thread Ben Finney
Gregory Ewing greg.ew...@canterbury.ac.nz writes: IMO, it shouldn't be necessary to explicitly copy docstrings around like this in the first place. Either it should happen automatically, or help() should be smart enough to look up the inheritance hierarchy when given a method that doesn't

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

2011-06-09 Thread Eric Snow
On Thu, Jun 9, 2011 at 10:10 AM, Ethan Furman et...@stoneleaf.us wrote: Eric Snow wrote: p.s. Am I missing something or can you really not change the docstring of a class?  I was thinking about the idea of inheriting class docstrings too.

Re: how to inherit docstrings?

2011-06-09 Thread Eric Snow
On Thu, Jun 9, 2011 at 5:23 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: Gregory Ewing greg.ew...@canterbury.ac.nz writes: IMO, it shouldn't be necessary to explicitly copy docstrings around like this in the first place. Either it should happen automatically, or help() should be smart

Re: the stupid encoding problem to stdout

2011-06-09 Thread Terry Reedy
On 6/9/2011 5:46 PM, Nobody wrote: On Thu, 09 Jun 2011 22:14:17 +0100, Sérgio Monteiro Basto wrote: Exactly the opposite , if python don't know the encoding should not try decode to ASCII. What should it decode to, then? You can't write characters to a stream, only bytes. I want python

Re: the stupid encoding problem to stdout

2011-06-09 Thread Mark Tolonen
Sérgio Monteiro Basto sergi...@sapo.pt wrote in message news:4df137a7$0$30580$a729d...@news.telepac.pt... How I change sys.stdout.encoding always to UTF-8 ? at least have a consistent sys.stdout.encoding There is an environment variable that can force Python I/O to be a specfic encoding:

Re: Any Better logic for this problem..

2011-06-09 Thread Dan Stromberg
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 AM, Ganapathy Subramanium sganapathy.subraman...@gmail.com wrote: Hi

Re: how to inherit docstrings?

2011-06-09 Thread Carl Banks
On Thursday, June 9, 2011 3:27:36 PM UTC-7, Gregory Ewing wrote: IMO, it shouldn't be necessary to explicitly copy docstrings around like this in the first place. Either it should happen automatically, or help() should be smart enough to look up the inheritance hierarchy when given a method

Re: the stupid encoding problem to stdout

2011-06-09 Thread Sérgio Monteiro Basto
Nobody wrote: Exactly the opposite , if python don't know the encoding should not try decode to ASCII. What should it decode to, then? UTF-8, as in tty, how I change this default ? You can't write characters to a stream, only bytes. ok got the point . Thanks, --

Re: the stupid encoding problem to stdout

2011-06-09 Thread Sérgio Monteiro Basto
Mark Tolonen wrote: Sérgio Monteiro Basto sergi...@sapo.pt wrote in message news:4df137a7$0$30580$a729d...@news.telepac.pt... How I change sys.stdout.encoding always to UTF-8 ? at least have a consistent sys.stdout.encoding There is an environment variable that can force Python I/O to

Re: Python 2.6 OR 3.2

2011-06-09 Thread Dan Stromberg
If your dependencies are satisfiable with 3.2, you're better off with 3.2. If not, use 2.7, or consider porting the dependencies yourself (assuming those dependencies have code available). Both 2.x and 3.x are good, but 3.x is clearly the way forward. 3.x has some annoyances corrected: more

Re: how to inherit docstrings?

2011-06-09 Thread Ben Finney
Carl Banks pavlovevide...@gmail.com writes: 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. In which case the onus is on the programmer implementing different behaviour to also

Re: the stupid encoding problem to stdout

2011-06-09 Thread Ben Finney
Sérgio Monteiro Basto sergi...@sapo.pt writes: Nobody wrote: Exactly the opposite , if python don't know the encoding should not try decode to ASCII. Are you advocating that Python should refuse to write characters unless the encoding is specified? I could sympathise with that, but

Re: the stupid encoding problem to stdout

2011-06-09 Thread Sérgio Monteiro Basto
Ben Finney wrote: Exactly the opposite , if python don't know the encoding should not try decode to ASCII. Are you advocating that Python should refuse to write characters unless the encoding is specified? I could sympathise with that, but currently that's not what Python does; instead

Re: how to inherit docstrings?

2011-06-09 Thread Eric Snow
On Thu, Jun 9, 2011 at 7:12 PM, Carl Banks pavlovevide...@gmail.com wrote: On Thursday, June 9, 2011 3:27:36 PM UTC-7, Gregory Ewing wrote: IMO, it shouldn't be necessary to explicitly copy docstrings around like this in the first place. Either it should happen automatically, or help() should

Re: how to inherit docstrings?

2011-06-09 Thread Carl Banks
On Thursday, June 9, 2011 6:42:44 PM UTC-7, Ben Finney wrote: Carl Banks writes: 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. In which case the onus is on the

Re: how to inherit docstrings?

2011-06-09 Thread Carl Banks
On Thursday, June 9, 2011 7:37:19 PM UTC-7, Eric Snow wrote: When I write ABCs to capture an interface, I usually put the documentation in the docstrings there. Then when I implement I want to inherit the docstrings. Implicit docstring inheritance for abstract base classes would meet my

Re: Python 2.6 OR 3.2

2011-06-09 Thread Kyle T. Jones
John Gordon wrote: In 9037ef5f-53c5-42c6-ac5d-8f942df6c...@x38g2000pri.googlegroups.com hisan santosh.s...@gmail.com writes: Hi All, Please let me know which one is GOOD whether Python 2.6 OR 3.2. Please let me know the difference between them. Please give some refernce site or books to

Re: Python 2.6 OR 3.2

2011-06-09 Thread Terry Reedy
On 6/9/2011 11:41 PM, Kyle T. Jones wrote: Library support. I urge people who use 2.x only for library support to let library authors that they would have preferred a 3.x compatible library. I have library authors say Why port when none of my users have asked for a port? A couple of years

Re: how to inherit docstrings?

2011-06-09 Thread Terry Reedy
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 inheriting them. However, I'd be +1 easily on a little

Re: Python 2.6 OR 3.2

2011-06-09 Thread Andrew Berg
On 2011.06.09 12:18 PM, hisan wrote: Hi All, Please let me know which one is GOOD whether Python 2.6 OR 3.2. Please let me know the difference between them. Please give some refernce site or books to know the difference I'm just a beginner, but AFAICT, there are three reasons to learn Python

Re: how to inherit docstrings?

2011-06-09 Thread Eric Snow
On Thu, Jun 9, 2011 at 9:59 PM, Terry Reedy tjre...@udel.edu 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

Re: smtp - python

2011-06-09 Thread Josias L . Gonçalves
Thank you. The question is that. Get the messages that was sended and save in maildir format. One more question... testing here, has the smtpd.pureproxy support stream username and password for smtp authentication ?. I read some doc and don't find anything about. --

Re: how to inherit docstrings?

2011-06-09 Thread Ben Finney
Carl Banks pavlovevide...@gmail.com writes: On Thursday, June 9, 2011 7:37:19 PM UTC-7, Eric Snow wrote: When I write ABCs to capture an interface, I usually put the documentation in the docstrings there. Then when I implement I want to inherit the docstrings. Implicit docstring

Re: how to inherit docstrings?

2011-06-09 Thread Ben Finney
Ben Finney ben+pyt...@benfinney.id.au writes: class Square(Shape): An equal-sided quadrilateral polygon. That this docstring is imprecise (it describes any rhombus, not necessarily a square) is something I hope no-one else notices or draws attention to. Oh, darn. -- \ “The sun

Re: how to inherit docstrings?

2011-06-09 Thread Chris Angelico
On Fri, Jun 10, 2011 at 3:25 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: Ben Finney ben+pyt...@benfinney.id.au writes: class Square(Shape):     An equal-sided quadrilateral polygon. That this docstring is imprecise (it describes any rhombus, not necessarily a square) is something I

Re: the stupid encoding problem to stdout

2011-06-09 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: the stupid encoding problem to stdout

2011-06-09 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

[issue7753] newgil backport

2011-06-09 Thread Julian Mehnle
Changes by Julian Mehnle jul...@mehnle.net: -- nosy: +jmehnle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7753 ___ ___ Python-bugs-list mailing

[issue9284] inspect.findsource() cannot find source for doctest code

2011-06-09 Thread Dirkjan Ochtman
Dirkjan Ochtman dirk...@ochtman.nl added the comment: Would it still be possible to get this into 2.7.2? It's a 2.6-2.7 regression, would be nice to fix, and it seems fairly low-impact. -- nosy: +benjamin.peterson ___ Python tracker

[issue12187] subprocess.wait() with a timeout uses polling on POSIX

2011-06-09 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Antoine is right: we don't have to be portable. We don't have to, but writing one POSIX-conformant solution is better than writing N OS-specific solutions, no? That's what POSIX is about. Should we block the signal? Yes. What

[issue1195571] simple callback system for Py_FatalError

2011-06-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Sorry, the documentation in the patch is wrong. It should be: Cause :cfunc:`Py_FatalError` to invoke the given function before printing to standard error and aborting out of the process. I don't think it's worth making it more

[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-06-09 Thread Vinay Sajip
New submission from Vinay Sajip vinay_sa...@yahoo.co.uk: The attached file 'data.bin' was written using Python 3.2. It can be read by Python 2.7, but in 3.2 and 3.3, after the first object is read, the file pointer is positioned at EOF, causing an error on subsequent reads. A simple test

[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-06-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Sadly, marshal.load() looks broken: - The function starts with the comment /* XXX Quick hack -- need to do this differently */ - It starts by calling f.read() which consumes the whole file (and explains the issue reported here) -

[issue8407] expose signalfd(2) and pthread_sigmask in the signal module

2011-06-09 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Oh, sigwait() doesn't accept a timeout! I would be nice to have also sigwaitinfo().. and maybe also its friend, sigwaitinfo() Oops, I mean sigtimedwait() and sigwaitinfo(). -- ___

[issue12187] subprocess.wait() with a timeout uses polling on POSIX

2011-06-09 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: (I should not answer in this issue, but in #8407) See also issue #8407 for sigtimedwait() and signalfd() in Python. You didn't commit the signalfd part? Not yet because I would like to provide something to decode the data

[issue1626300] 'Installing Python Modules' does not work for Windows

2011-06-09 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 2951641faed1 by Éric Araujo in branch '2.7': Add examples that work on Windows to distutils docs (#1626300) http://hg.python.org/cpython/rev/2951641faed1 -- nosy: +python-dev ___ Python

[issue12197] non-blocking SSL write in Windows sends large data but raises exception

2011-06-09 Thread David Siroky
David Siroky sir...@dasir.cz added the comment: I didn't meant blocking as setblocking(True). I use select/poll but I can't use returned value from send() immediately since in Windows there are often needed more send rounds to actually know how much data was sent. E.g. in Linux I know it

[issue12243] getpass.getuser works on OSX

2011-06-09 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: That would be Doc/tools/sphinxext/pyspecific.py -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12243 ___

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

2011-06-09 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I don’t like the idea of built-in functions being displayed as “builtins.int”: normal use of builtins is without explicit use of the module name. -- ___ Python tracker rep...@bugs.python.org

[issue12246] Warn when trying to install third-party module from an uninstalled checkout

2011-06-09 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Great! I will edit a bit the message and commit this. -- stage: - commit review type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12246

[issue11203] gzip doc is behind

2011-06-09 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Just one thing: I think the close call needs equal treatment to the open call. The open call is a module-level functions; the close method of GzipFile cannot be equally treated, as it is in the doc of the class, where no methods are given

[issue8927] Handle version incompatibilities in dependencies

2011-06-09 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: [Sridhar] No, it’s register that uploads metadata. (was not sent before?) To me, not to the tracker. Ok, that's interesting. Does p7g.install support packages that do not register their new releases? Setuptools/PIP does by scraping the

[issue12242] distutils2 environment marker for current compiler

2011-06-09 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: One issue is that multiple compiler patterns may match, Right, we can’t say “first matches” win if it’s unordered, and we won’t have OrderedDict in all versions supported by distutils2. Make it a list of tuples. First match wins, so people

[issue12278] Core mentorship mention in the devguide

2011-06-09 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: You can just take the descriptions from the mail.python.org page. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12278 ___

[issue10645] Remove egg-info files in stdlib

2011-06-09 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- dependencies: +Removing wsgiref.egg-info ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10645 ___ ___

[issue12292] bpython

2011-06-09 Thread Ravish
New submission from Ravish ravish_nayak2...@yahoo.co.in: I was trying to install bpython v0.9.7.1(latest version) on python 2.6.5, it works fine. But If i try to install on python v3.2 it's behaviour is quite abnormal. i.e if I run(bpython) from command prompt, I could able to see the fancy

[issue1626300] 'Installing Python Modules' does not work for Windows

2011-06-09 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 072dbebaa83b by Éric Araujo in branch '3.2': Add examples that work on Windows to distutils docs (#1626300) http://hg.python.org/cpython/rev/072dbebaa83b -- ___ Python tracker

[issue9312] Fix usage of :option: markup in stdlib ReST docs

2011-06-09 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 59d785ea0039 by Éric Araujo in branch '3.2': Fix a few misuses of :option: I missed in r86521. http://hg.python.org/cpython/rev/59d785ea0039 -- nosy: +python-dev ___ Python tracker

[issue10645] Remove egg-info files in stdlib

2011-06-09 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset e3f6c10eb590 by Éric Araujo in branch 'default': Stop creating a Python-X.Y.Z-pyX.Y.egg-info file on install (#10645) http://hg.python.org/cpython/rev/e3f6c10eb590 New changeset af7bc95e5b1e by Éric Araujo in branch 'default': The

[issue10645] Remove egg-info files in stdlib

2011-06-09 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10645 ___

[issue12293] wrong arguments passed to SMTP.sendmail in example

2011-06-09 Thread Fredrik Wendt
New submission from Fredrik Wendt fred...@wendt.se: On http://docs.python.org/library/email-examples.html#email-examples the current example (v2.7.1) at the bottom incorrectly calls SMTP.sendmail() with a single recipient e-mail address. It should be a list of addresses. -- assignee:

  1   2   3   >