odt2sphinx 0.2.3 released

2012-09-07 Thread Christophe de Vienne
Hello, odt2sphinx 0.2.3 is now available on pypi : http://pypi.python.org/pypi/odt2sphinx/. Odt2sphinx convert OpenDocument Text file(s) to one or several .rst files suitable for Sphinx. Changes --- * Fix filename generation by replacing any non-alphanumeric character (issue #3). * Fix

Re: How to print something only if it exists?

2012-09-07 Thread Hans Mulder
On 6/09/12 19:59:05, tinn...@isbd.co.uk wrote: I want to print a series of list elements some of which may not exist, e.g. I have a line:- print day, fld[1], balance, fld[2] fld[2] doesn't always exist (fld is the result of a split) so the print fails when it isn't set. How about:

Re: Python newbie here! No module named settings

2012-09-07 Thread chandraganeshchowdary
On Thursday, June 2, 2011 8:59:48 PM UTC+5:30, Neeraj Agarwal wrote: Hello all, I'm a newbie to Python and its my 2nd day exploring it. I was trying to use Python wrapper for Google Charts API and was tweaking the examples. https://github.com/gak/pygooglechart/raw/master/examples/pie.py

Re: Accessing dll

2012-09-07 Thread Chris Angelico
On Fri, Sep 7, 2012 at 1:44 AM, Helpful person rrl...@yahoo.com wrote: FYI My Python version is 2.5.4 You may wish to upgrade, that's quite an old version. Unless something's binding you to version 2.x, I would strongly recommend migrating to 3.2 or 3.3. ChrisA --

Division help in python

2012-09-07 Thread Ramyasri Dodla
Hi All, I am brand new to python. checking over basic stuff. I came across the problem while doing so. If any body aware of the problem, kindly respond me. 5/10 0 - 5/10 -1 The second case also should yield a 'zero' but it is giving a -1 some other examples for your review. -10/5 -2 -5/-5

Re: Division help in python

2012-09-07 Thread Chris Angelico
On Fri, Sep 7, 2012 at 10:53 PM, Ramyasri Dodla ramyasr...@gmail.com wrote: I am brand new to python. checking over basic stuff. I came across the problem while doing so. If any body aware of the problem, kindly respond me. 5/10 0 - 5/10 -1 The second case also should yield a 'zero' but

Re: How to print something only if it exists?

2012-09-07 Thread Roy Smith
In article 9s4nh9-8dr@chris.zbmc.eu, tinn...@isbd.co.uk wrote: I want to print a series of list elements some of which may not exist, e.g. I have a line:- print day, fld[1], balance, fld[2] fld[2] doesn't always exist (fld is the result of a split) so the print fails when it

Re: Bitshifts and And vs Floor-division and Modular

2012-09-07 Thread Mark Lawrence
On 07/09/2012 02:08, Cameron Simpson wrote: On 07Sep2012 01:30, Mark Lawrence breamore...@yahoo.co.uk wrote: | On 07/09/2012 01:01, jimbo1qaz wrote: | Is it faster to use bitshifts or floor division? And which is better, or %? | All divisors and mods are power of 2, so are binary operations

Defining features in a list

2012-09-07 Thread M Whitman
Good Morning, I have been recently trying to define all of the features in a list but have been running into errors. I would like to define the features similar to the following print statement. Any advice would be appreciated. I'm trying to transition my output from a text file to excel

Re: Bitshifts and And vs Floor-division and Modular

2012-09-07 Thread Grant Edwards
On 2012-09-07, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: My *guess* is that you mean *bitwise* operators, compared to numeric operators like * and // (integer division). The runtime cost is mostly dominated by the object-oriented overhead -- Python is not C or assembly,

Re: Function for examine content of directory

2012-09-07 Thread Tigerstyle
kl. 16:56:29 UTC+2 torsdag 6. september 2012 skrev Tigerstyle følgende: Hi guys, I'm trying to write a module containing a function to examine the contents of the current working directory and print out a count of how many files have each extension (.txt, .doc, etc.) This is

Re: Function for examine content of directory

2012-09-07 Thread Tigerstyle
Ok I'm now totally stuck. This is the code: --- import os from collections import Counter path = :c\\mypath\dir dirs = os.listdir( path ) filenames = {this.txt, that.txt, the_other.txt,this.doc,that.doc,this.pdf,first.txt,that.pdf} extensions = [] for filename in filenames: f =

Re: Defining features in a list

2012-09-07 Thread Dave Angel
On 09/07/2012 09:42 AM, M Whitman wrote: Good Morning, I have been recently trying to define all of the features in a list but have been running into errors. How proficient are you in Python? Could you possibly use terms which make sense to someone who doesn't know this arcGIS program? I'm

Re: Defining features in a list

2012-09-07 Thread M Whitman
Dave- By features I was refering to items in the list. For background the arcpy module is used for geoprocessing of geographic information. I'm using my script to get totals for features in a dataset that I receive on a regular basis- for example total number of hydrants, total number of

Re: Defining features in a list

2012-09-07 Thread Jean-Michel Pichavant
M Whitman wrote: Good Morning, I have been recently trying to define all of the features in a list but have been running into errors. I would like to define the features similar to the following print statement. Any advice would be appreciated. I'm trying to transition my output from a

Re: Defining features in a list

2012-09-07 Thread Dave Angel
On 09/07/2012 11:21 AM, M Whitman wrote: Dave- By features I was refering to items in the list. For background the arcpy module is used for geoprocessing of geographic information. I'm using my script to get totals for features in a dataset that I receive on a regular basis- for example

Re: Division help in python

2012-09-07 Thread Jean-Michel Pichavant
Ramyasri Dodla wrote: Hi All, I am brand new to python. checking over basic stuff. I came across the problem while doing so. If any body aware of the problem, kindly respond me. 5/10 0 - 5/10 -1 The second case also should yield a 'zero' but it is giving a -1 Why should it yield 'zero'

Re: Bitshifts and And vs Floor-division and Modular

2012-09-07 Thread rusi
On Sep 7, 9:32 am, Paul Rubin no.em...@nospam.invalid wrote: rusi rustompm...@gmail.com writes: On an 8086/8088 a MUL (multiply) instruction was of the order of 100 clocks ...  On most modern processors (after the pentium) the difference has mostly vanished.  I cant find a good data sheet

Re: Bitshifts and And vs Floor-division and Modular

2012-09-07 Thread Dave Angel
On 09/07/2012 12:59 PM, rusi wrote: On Sep 7, 9:32 am, Paul Rubin no.em...@nospam.invalid wrote: rusi rustompm...@gmail.com writes: On an 8086/8088 a MUL (multiply) instruction was of the order of 100 clocks ... On most modern processors (after the pentium) the difference has mostly

Re: Accessing dll

2012-09-07 Thread Helpful person
On Sep 7, 5:16 am, Chris Angelico ros...@gmail.com wrote: On Fri, Sep 7, 2012 at 1:44 AM, Helpful person rrl...@yahoo.com wrote: FYI My Python version is 2.5.4 You may wish to upgrade, that's quite an old version. Unless something's binding you to version 2.x, I would strongly recommend

Reusable (local) Modules

2012-09-07 Thread Travis Griggs
I'm relatively new to Python (coming from strong C and Smalltalk backgrounds). I've written a couple of relatively small apps (one or two .py files). I'm using PyCharm (I love it). I'm curious what the pythonic approach is to creating your own reusable modules. Any tutorials or high level

Re: Reusable (local) Modules

2012-09-07 Thread Dave Angel
On 09/07/2012 01:56 PM, Travis Griggs wrote: I'm relatively new to Python (coming from strong C and Smalltalk backgrounds). I've written a couple of relatively small apps (one or two .py files). I'm using PyCharm (I love it). I'm curious what the pythonic approach is to creating your own

Re: Reusable (local) Modules

2012-09-07 Thread Dave Angel
On 09/07/2012 01:56 PM, Travis Griggs wrote: I'm relatively new to Python (coming from strong C and Smalltalk backgrounds). I've written a couple of relatively small apps (one or two .py files). I'm using PyCharm (I love it). I'm curious what the pythonic approach is to creating your own

Re: Division help in python

2012-09-07 Thread Serhiy Storchaka
On 07.09.12 15:53, Ramyasri Dodla wrote: I am brand new to python. checking over basic stuff. I came across the problem while doing so. If any body aware of the problem, kindly respond me. 5/10 0 - 5/10 -1 The second case also should yield a 'zero' but it is giving a -1

Using Raw Data in NLTK

2012-09-07 Thread subhabangalore
Dear Group, I am trying to use NLTK and its statistical classifiers. The system is working fine but I am trying to use my own data, instead of things like, from nltk.corpus import brown from nltk.corpus import names If any one can kindly guide me up. Thanks in Advance, Regards, Subhabrata.

Re: ctypes - python2.7.3 vs python3.2.3

2012-09-07 Thread John Gordon
In 9a74$503e88dd$546bb230$30...@cache80.multikabel.net Jan Kuiken jan.kui...@quicknet.nl writes: uint32_t myfunction (char ** _mydata) { char mydata[16]; strcpy(mydata, Hello Dude!); *_mydata = mydata; return 0; } mydata is an auto variable, which goes out

Re: Comparing strings from the back?

2012-09-07 Thread Oscar Benjamin
On 2012-09-07, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: snip After further thought, and giving consideration to the arguments given by people here, I'm now satisfied to say that for equal-length strings, string equality is best described as O(N). 1) If the strings are

Re: Comparing strings from the back?

2012-09-07 Thread Oscar Benjamin
On 2012-09-07, Oscar Benjamin oscar.j.benja...@gmail.com wrote: On 2012-09-07, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: snip Since string comparison is only useful if the strings can be equal or unequal, the average case depends on how often they are equal/unequal as well

Re: Dynamically scheduling Cron Jobs for Python Scripts.

2012-09-07 Thread Michael Ströder
Miki Tebeka wrote: I want to re run the script at that schedule time to send me a email. Calculate how much time until the meeting. And spawn the script that will sleep that amount of time and then send email. And if the process gets interrupted in the meantime (e.g. because of reboot)?

Re: Using Raw Data in NLTK

2012-09-07 Thread Terry Reedy
On 9/7/2012 3:02 PM, subhabangal...@gmail.com wrote: Dear Group, I am trying to use NLTK and its statistical classifiers. The system is working fine but I am trying to use my own data, instead of things like, from nltk.corpus import brown from nltk.corpus import names If any one can kindly

Re: Comparing strings from the back?

2012-09-07 Thread Dwight Hutto
With unequal strings/lists to match, it would seem that one would regex through the larger string/list with the shorter string, and piece by piece begin to match for partial percentage matches in relation to the longer iterative item. -- Best Regards, David Hutto *CEO:*

how to run python2.6 module with absolute imports stand alone

2012-09-07 Thread Gelonida N
Hi, many of my modules contain following section at the end def main(): do_something() if __name__ == '__main__': main() This allows me to run some basic example code or some small test in a stand alone mode. My new modules contain following line at the beginning: from __future__

Re: Comparing strings from the back?

2012-09-07 Thread Dwight Hutto
On Fri, Sep 7, 2012 at 5:59 PM, Dwight Hutto dwightdhu...@gmail.com wrote: With unequal strings/lists to match, it would seem that one would regex through the larger string/list with the shorter string, and piece by piece begin to match for partial percentage matches in relation to the longer

Re: how to run python2.6 module with absolute imports stand alone

2012-09-07 Thread Mark Lawrence
On 07/09/2012 23:04, Gelonida N wrote: Hi, many of my modules contain following section at the end def main(): do_something() if __name__ == '__main__': main() This allows me to run some basic example code or some small test in a stand alone mode. My new modules contain following

Re: Comparing strings from the back?

2012-09-07 Thread Steven D'Aprano
On Fri, 07 Sep 2012 19:10:16 +, Oscar Benjamin wrote: On 2012-09-07, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: snip After further thought, and giving consideration to the arguments given by people here, I'm now satisfied to say that for equal-length strings, string

Re: Comparing strings from the back?

2012-09-07 Thread Dwight Hutto
Why don' you just time it,eit lops through incrementing thmax input/ -- Best Regards, David Hutto *CEO:* *http://www.hitwebdevelopment.com* -- http://mail.python.org/mailman/listinfo/python-list

Re: Python newbie here! No module named settings

2012-09-07 Thread Jason Friedman
I was trying to use Python wrapper for Google Charts API and was tweaking the examples. https://github.com/gak/pygooglechart/raw/master/examples/pie.py This is the script which I was trying. And the python interpreter gives the following error: import settings ImportError: No module

[issue15876] test_curses refleak

2012-09-07 Thread Ross Lagerwall
New submission from Ross Lagerwall: [1/1] test_curses beginning 6 repetitions 123456 . test_curses leaked [1, 1, 1] references, sum=3 1 test failed: test_curses [154814 refs] -- assignee: rosslagerwall messages: 169973 nosy: rosslagerwall priority: low severity: normal status: open

[issue15877] xml.dom.minidom cannot parse ISO-2022-JP

2012-09-07 Thread Dan Callaghan
New submission from Dan Callaghan: Python 2.7.3 (default, Jul 24 2012, 10:05:38) [GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux2 Type help, copyright, credits or license for more information. c = u'\u65e5\u672c\u8a9e' import xml.dom.minidom Encoded as UTF-8, everything is fine:

[issue15876] test_curses refleak

2012-09-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset c82e3a6553fc by Ross Lagerwall in branch 'default': Issue #15876: Fix a refleak in the curses module http://hg.python.org/cpython/rev/c82e3a6553fc -- nosy: +python-dev ___ Python tracker

[issue15876] test_curses refleak

2012-09-07 Thread Ross Lagerwall
Ross Lagerwall added the comment: This didn't get picked up by Antoine's daily refleak test run because test curses only runs when stdout is a TTY. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15876

[issue15870] PyType_FromSpec should take metaclass as an argument

2012-09-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: If filling out a type with all slots one-by-one is considered too tedious, and patching ob_type too hacky - here is another approach: Use FromSpec to create a type with all slots filled out, then call the metatype to create a subtype of that. I.e. the type

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2012-09-07 Thread Steven Bethard
Steven Bethard added the comment: Interesting idea! The regex would need a little extra care to interoperate properly with prefix_chars, but the approach doesn't seem crazy. I'd probably call the constructor option something like args_default_to_positional (the current behavior is essentially

[issue15874] argparse cannot parse shell variable arguments in file-given arguments

2012-09-07 Thread Steven Bethard
Steven Bethard added the comment: You could try declaring a type converter and using the type= parameter of add_argument. Your type converter could look something like: def expanded_path(arg): return os.path.expandvars(arg) Would that work? --

[issue15876] test_curses refleak

2012-09-07 Thread Ross Lagerwall
Changes by Ross Lagerwall rosslagerw...@gmail.com: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15876 ___

[issue15878] struct long type size

2012-09-07 Thread Сергей Ковба
New submission from Сергей Ковба: Such code PackageFile.write(struct.pack( l, PkgHdrSize)) have different behaviour on 32-bit and 64-bit systems. In case 32-bit system it writes to file 4 bytes. and 8 bytes in case 64-bit system, but in http://docs.python.org/library/struct.html p.7.3.2.2 long

[issue15878] struct long type size

2012-09-07 Thread Mark Dickinson
Mark Dickinson added the comment: This is expected behaviour. By default, struct.pack and struct.unpack use the *native* size and alignment. Use l if you want platform-independent behaviour. Relevant docs: http://docs.python.org/library/struct.html#byte-order-size-and-alignment --

[issue15877] xml.dom.minidom cannot parse ISO-2022-JP

2012-09-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This is similar to issue13612: pyexpat does not support multibytes encodings. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15877

[issue14900] cProfile does not take its result headers as sort arguments

2012-09-07 Thread Arne Babenhauserheide
Arne Babenhauserheide added the comment: What would be the best way to get this patch reviewed? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14900 ___

[issue14900] cProfile does not take its result headers as sort arguments

2012-09-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: I'll take a look next week if nobody else do it before. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14900 ___

[issue12370] Use of super overwrites use of __class__ in class namespace

2012-09-07 Thread Nick Coghlan
Nick Coghlan added the comment: OK, I think I have a way to fix this that will actually *reduce* the level of special casing needed in the compiler. Specifically, I think we may be able to make the class statement emit *two* scopes, rather than the current one. The outer scope would be

[issue15867] make importlib documentation easier to use

2012-09-07 Thread Chris Jerdonek
Changes by Chris Jerdonek chris.jerdo...@gmail.com: -- title: It's hard to decypher how to build off of the provided objects from the importlib docs - make importlib documentation easier to use ___ Python tracker rep...@bugs.python.org

[issue15879] set.__or__, __and__, etc create subclass types, but ignore __new__

2012-09-07 Thread Jon Obermark
New submission from Jon Obermark: If they are not going to call the __metaclass__ or the class __new__, then they should return `set` objects instead of subclass objects, so that it is clear what is going on. As it is, the results of set operations receive some subclass information but not

[issue15867] make importlib documentation easier to use

2012-09-07 Thread Julian Berman
Julian Berman added the comment: Eric: Yeah I've seen that, it's the one thing that I kept open as I was turning back and forth through the various parts of importlib. So yeah I like that document certainly at least a bit :). Also thanks to both you and Brett for linking that issue, that's

[issue15874] argparse cannot parse shell variable arguments in file-given arguments

2012-09-07 Thread R. David Murray
R. David Murray added the comment: I had forgotten all about os.path.expandvars. Note, however, that that function is very naive: os.path.expandvars('$HOME') '/home/rdmurray' That is, it is doing unconditional substitution, not parsing shell syntax. It should work well for simple

[issue15879] set.__or__, __and__, etc create subclass types, but ignore __new__

2012-09-07 Thread R. David Murray
R. David Murray added the comment: It is probably true that this is a bug, but subclasses of mutable classes do not normally override __new__. (I'm curious what your use case is for doing so.) -- nosy: +benjamin.peterson, r.david.murray ___ Python

[issue15880] os.path.split() and long UNC names

2012-09-07 Thread Kalle Rutanen
New submission from Kalle Rutanen: On Windows, long-UNC paths are needed to inspect and modify paths with more than 260 characters. The os.path.split() function behaves incorrectly in the presence of a long-UNC prefix //?/ or \\?\. Consider iterating d = os.path.split(d)[0] with d =

[issue15879] set.__or__, __and__, etc create subclass types, but ignore __new__

2012-09-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This was already fixed (in the 3.x releases) by issue1721812. -- nosy: +amaury.forgeotdarc resolution: - out of date status: open - closed superseder: - A subclass of set doesn't always have __init__ called.

[issue15880] os.path.split() and long UNC names

2012-09-07 Thread Kalle Rutanen
Kalle Rutanen added the comment: By inspecting the code for os.path.split() in ntpath.py, one sees that the problem is actually in os.path.splitdrive(), which does not handle long-UNC paths. -- ___ Python tracker rep...@bugs.python.org

[issue12067] Doc: remove errors about mixed-type comparisons.

2012-09-07 Thread Mike Hoy
Changes by Mike Hoy mho...@gmail.com: -- nosy: +mikehoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12067 ___ ___ Python-bugs-list mailing list

[issue12370] Use of super overwrites use of __class__ in class namespace

2012-09-07 Thread Eric Snow
Eric Snow added the comment: Wouldn't the following also start working (currently a NameError)? class X: def f(self): print(f.__qualname__) def g(self): f(None) X().f() X().g() How about this[1] (also currently a NameError): class Outer: class

[issue12370] Use of super overwrites use of __class__ in class namespace

2012-09-07 Thread Eric Snow
Eric Snow added the comment: Actually, that second would still not work (it would have to pass through the non-lexical inner scope that Nick mentioned). Is that also the case for the first one? -- ___ Python tracker rep...@bugs.python.org

[issue15880] os.path.split() and long UNC names

2012-09-07 Thread Kalle Rutanen
Kalle Rutanen added the comment: It seems to me that this problem can be fixed by replacing splitdrive with splitunc at line 170 in ntpath.py. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15880

[issue6178] Core error in Py_EvalFrameEx 2.6.2

2012-09-07 Thread Chris Kaynor
Chris Kaynor added the comment: Was any resolution found for this? I am debugging some intermittent crashes now which have the same visible callstack as Tim reported. tstate-frame is NULL on line 2717 of ceval.c I am using an in-house compiled Python 2.6.4, compiled with Visual Studio 2008,

[issue15879] set.__or__, __and__, etc create subclass types, but ignore __new__

2012-09-07 Thread Jon Obermark
Jon Obermark added the comment: The closing author is correct, the use case is adequately covered by __init__, and that has been fixed in 3. It makes sense this will not be backported. -- ___ Python tracker rep...@bugs.python.org

[issue6178] Core error in Py_EvalFrameEx 2.6.2

2012-09-07 Thread Tim Savannah
Tim Savannah added the comment: As an update (since someone else has this problem) this issue stopped once we converted from centos to archlinux (www.archlinux.org). May be an underlying issue with something in the centos environment. We used the same modules same configuration basically same

[issue15822] installed python may fail incorrectly trying to rebuild lib2to3 grammar pickles

2012-09-07 Thread Martin v . Löwis
Martin v. Löwis added the comment: I think the patch for issue 15645 was incorrect. Instead of generating the pickles in the source tree and copying them, it should have arranged lib2to3 to generate them in the target directory instead (just as all the compileall invocations also generate

[issue15340] OSError with import random when /dev/urandom doesn't exist (regression from 2.6)

2012-09-07 Thread Martin v . Löwis
Martin v. Löwis added the comment: I disagree that the regression is critical. IIUC, it fails on systems without urandom, such as Tru64 and HPUX. However, failure to support such systems is *not* critical, IMO; I think that OS-specific failures should be considered critical only if they occur

[issue15340] OSError with import random when /dev/urandom doesn't exist (regression from 2.6)

2012-09-07 Thread Martin v . Löwis
Martin v. Löwis added the comment: An interesting question is whether the patch should be applied to 2.6 and 3.1. It is not a security fix in itself, which suggests that it shouldn't apply. OTOH, it's a follow-up to an earlier security fix. -- ___

[issue15340] OSError with import random when /dev/urandom doesn't exist (regression from 2.6)

2012-09-07 Thread Ian Wienand
Ian Wienand added the comment: I'm not sure what systems are defined as critical or not. Although python is not really installable/configurable by end-users on ESXi, I noticed during development because we use python very early in the boot, before /dev/urandom appears for us (it comes from a

[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-07 Thread Chris McDonough
New submission from Chris McDonough: The symptom is an exact duplicate of the symptom reported in the following (closed) issue: http://bugs.python.org/issue9775 The issue is also related to the following other issues: http://bugs.python.org/issue4106 http://bugs.python.org/issue9205

[issue15340] OSError with import random when /dev/urandom doesn't exist (regression from 2.6)

2012-09-07 Thread The Written Word
The Written Word added the comment: We're running Tru64 UNIX 5.1A, not 5.1B which definitely doesn't have /dev/urandom. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15340 ___

[issue15340] OSError with import random when /dev/urandom doesn't exist (regression from 2.6)

2012-09-07 Thread The Written Word
The Written Word added the comment: We do not have KRNG11i installed. It did not ship with the original installation of HP-UX 11.11. It needs to be loaded after-the-fact and we cannot be ensured that our customers will have this module installed nor do we wish to make it a requirement.

[issue15851] Lib/robotparser.py doesn't accept setting a user agent string, instead it uses the default.

2012-09-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Enhancements can only be targeted at 3.4, where robotparser is now urllib.robotparser I wonder if documenting the simple solution would be sufficient. -- nosy: +orsenthil, terry.reedy versions: +Python 3.4 -Python 2.7

[issue15851] Lib/robotparser.py doesn't accept setting a user agent string, instead it uses the default.

2012-09-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: In any case, a doc change *could* go in 2.7 and 3.3/2. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15851 ___

[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-07 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15881 ___ ___ Python-bugs-list mailing

[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-07 Thread Chris McDonough
Chris McDonough added the comment: Patch for tip. -- keywords: +patch Added file: http://bugs.python.org/file27142/shutdown_typeerror-tip.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15881

[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-07 Thread Chris McDonough
Chris McDonough added the comment: 2.7 branch patch. -- Added file: http://bugs.python.org/file27143/shutdown_typeerror-27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15881 ___

[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-07 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- stage: - patch review versions: -Python 2.6, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15881 ___

[issue15863] Fine-grained info about Python versions which support changes introduced in micro releases

2012-09-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I do not think there should be references between the Python 2 docs and Python 3 docs. But within each, I think it ok to have exceptional multiple references for what is, I believe, a unique situation: a security fix that required a new feature. Do it however

[issue15863] Fine-grained info about Python versions which support changes introduced in micro releases

2012-09-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: Well, the patch is welcome. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15863 ___ ___ Python-bugs-list

[issue15865] reflect bare star * in function signature documentation

2012-09-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: By looking at x.py, I confirmed that the added stars are correct. Also, the correction of 'header' to 'hdr' is correct. However, for threading.py in 3.3.0, I see class Thread: ... def __init__(self, group=None, target=None, name=None,

[issue15865] reflect bare star * in function signature documentation

2012-09-07 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks, Terry. If anyone is curious, it looks like the verbose keyword argument was added to the docs (and to threading.py) in revision f71acc4b2341, and then subsequently removed (but not from the docs) in revision 8ec51b2e57c2. (The fact that we found 2

[issue15340] OSError with import random when /dev/urandom doesn't exist (regression from 2.6)

2012-09-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2e8b01583839 by Antoine Pitrou in branch '3.2': Issue #15340: Fix importing the random module when /dev/urandom cannot be opened. http://hg.python.org/cpython/rev/2e8b01583839 New changeset a53fc9982e2a by Antoine Pitrou in branch 'default': Issue

[issue15340] OSError with import random when /dev/urandom doesn't exist (regression from 2.6)

2012-09-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset edbf37ace03c by Antoine Pitrou in branch '2.7': Issue #15340: Fix importing the random module when /dev/urandom cannot be opened. http://hg.python.org/cpython/rev/edbf37ace03c -- ___ Python tracker

[issue15340] OSError with import random when /dev/urandom doesn't exist (regression from 2.6)

2012-09-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, this is now fixed in 3.2/3.3/2.7. I'll leave it to Martin and Benjamin whether this should be backported to 2.6 and 3.1. (Georg, this changeset should probably be ported to 3.3.0 too) -- priority: release blocker - high versions: -Python 2.7,

[issue15882] _decimal.Decimal constructed from tuple

2012-09-07 Thread Aaron
New submission from Aaron: I think I may have found a problem with the code that constructs Infinity from tuples in the C _decimal module. # pure python (3.x or 2.x) decimal.Decimal( (0, (0, ), 'F')) Decimal('Infinity') # _decimal decimal.Decimal( (0, (0, ), 'F')) Traceback (most recent

[issue15882] _decimal.Decimal constructed from tuple

2012-09-07 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15882 ___ ___ Python-bugs-list

[issue14900] cProfile does not take its result headers as sort arguments

2012-09-07 Thread Arne Babenhauserheide
Arne Babenhauserheide added the comment: Thank you! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14900 ___ ___ Python-bugs-list mailing list

[issue12370] Use of super overwrites use of __class__ in class namespace

2012-09-07 Thread Nick Coghlan
Nick Coghlan added the comment: Yep. The only name in the new scope would be __class__. Everything else, including method names, should remain invisible from method bodies. I'm not 100% sure it will work as we want, but that's because I'm not sure if we can avoid causing a semantic change for

[issue15865] reflect bare star * in function signature documentation

2012-09-07 Thread Chris Jerdonek
Chris Jerdonek added the comment: Here is an updated patch that incorporates Terry's suggestion. -- Added file: http://bugs.python.org/file27145/issue-15865-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15865

[issue12370] Use of super overwrites use of __class__ in class namespace

2012-09-07 Thread Eric Snow
Eric Snow added the comment: sounds like it would be worth a shot -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12370 ___ ___ Python-bugs-list

[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The patch makes sense. I'll take another look over the weekend, but it seems to be ready to be applied. -- assignee: - belopolsky nosy: +belopolsky stage: patch review - commit review ___ Python tracker

[issue15881] multiprocessing 'NoneType' object is not callable

2012-09-07 Thread Chris Jerdonek
Chris Jerdonek added the comment: +# NB: we hold on to references to functions in the arglist due to the This is a nit, but I think adding NB:, Note:, etc. to the beginning of a comment is redundant because by being a comment it is already implicit that it should be noted. --

[issue15822] installed python may fail incorrectly trying to rebuild lib2to3 grammar pickles

2012-09-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: See als Issue15838. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15822 ___ ___ Python-bugs-list mailing

[issue15645] 2to3 Grammar pickles not created when upgrading to 3.3.0b2

2012-09-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: See also Issue15838 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15645 ___ ___ Python-bugs-list mailing

[issue15822] installed python may fail incorrectly trying to rebuild lib2to3 grammar pickles

2012-09-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: The other alternative to fix this is to revert the patch in issue 15645 and then remove the -E flag from PYTHON_FOR_BUILD. PYTHON_FOR_BUILD was introduced by a, possibly incomplete, attempt to introduce support for cross compiling. In particular, the

[issue15340] OSError with import random when /dev/urandom doesn't exist (regression from 2.6)

2012-09-07 Thread Georg Brandl
Georg Brandl added the comment: Now picked into the 3.3.0 release clone as 6a782496f90a. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15340 ___

[issue15781] test_threaded_import fails with -j4

2012-09-07 Thread Georg Brandl
Georg Brandl added the comment: Now picked into 3.3.0 release clone as 85070f284fd2. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15781 ___

[issue15784] OSError.__str__() should distinguish between errno and winerror

2012-09-07 Thread Georg Brandl
Georg Brandl added the comment: Done in 4e941113e4fa. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15784 ___ ___

  1   2   >