Re: RE: Unpaking Tuple

2012-10-09 Thread Bob Martin
in 682592 20121008 232126 Prasad, Ramit ramit.pra...@jpmorgan.com wrote: Thomas Bach wrote:=0D=0A Hi there,=0D=0A =0D=0A On Sat, Oct 06, 2012 at = 03:08:38PM +, Steven D'Aprano wrote:=0D=0A =0D=0A my_tuple =3D my_= tuple[:4]=0D=0A a,b,c,d =3D my_tuple if len(my_tuple) =3D=3D 4 else (my_=

Re: Unpaking Tuple

2012-10-09 Thread Dave Angel
On 10/09/2012 02:07 AM, Bob Martin wrote: in 682592 20121008 232126 Prasad, Ramit ramit.pra...@jpmorgan.com wrote: Thomas Bach wrote:=0D=0A Hi there,=0D=0A =0D=0A On Sat, Oct 06, 2012 at = 03:08:38PM +, Steven D'Aprano wrote:=0D=0A =0D=0A my_tuple =3D my_= tuple[:4]=0D=0A a,b,c,d =3D

Re: [Python-ideas] Make is checks on non-singleton literals errors

2012-10-09 Thread Chris Angelico
On Tue, Oct 9, 2012 at 1:14 PM, Guido van Rossum gu...@python.org wrote: Maybe we should do something more drastic and always create a new, unique constant whenever a literal occurs as an argument of 'is' or 'is not'? Then such code would never work, leading people to examine their code more

Re: Unpaking Tuple

2012-10-09 Thread Jussi Piitulainen
Dave Angel writes: On 10/09/2012 02:07 AM, Bob Martin wrote: in 682592 20121008 232126 Prasad, Ramit wrote: [snip mess] How does one unpack this post? ;-) Since that's not the way it arrived here, i have to ask, how do you get these posts? Are you subscribed to individual messages by

Re: Blue Screen Python

2012-10-09 Thread mikcec82
Il giorno venerdì 21 settembre 2012 16:04:48 UTC+2, mikcec82 ha scritto: Hallo to all, I'm using Python 2.7.3 with Windows 7 @ 64 bit and an Intel Core i3 -2350M CPU @2.30GHz 2.3GHz. Sometimes, when I'm programming in Python on my screen compare this blue screen:

FW: question Python custome events

2012-10-09 Thread Hussain, Mushabbar
Hi, Is it possible to define an Event which should fire when a value of a variable changes? Something like below self.Bind(wx.EVT_ON_VAL_CHANGE, variable_to_watch, self.Callback) I need a Text ctrl UI which continuously changes values based on external data changes. Unfortunately I could not

Re: Blue Screen Python

2012-10-09 Thread Philipp Hagemeister
On 10/09/2012 09:37 AM, mikcec82 wrote: In my script I open and close an html (in a FOR cycle); could be this the problem? Unless you're running your Python script as a kernel driver (and you can't do that accidentally), there is no way that your user-space program should cause a bluescreen.

Re: mangled messages (was: Unpaking Tuple)

2012-10-09 Thread Tim Chase
On 10/09/12 02:22, Jussi Piitulainen wrote: in 682592 20121008 232126 Prasad, Ramit wrote: [snip mess] How does one unpack this post? ;-) Since that's not the way it arrived here, i have to ask, how do you get these posts? I see a carriage return rendered as ^M at the end of every line

pydelicious documentation

2012-10-09 Thread Andres Soto
Does somebody know where I can get the documentation for pydelicious? The documentation links (For code documentation see doc/pydelicious or doc/dlcs.py.) in http://packages.python.org/pydelicious/README.html#id3  gave me  404 Not Found nginx/1.1.19   Prof. Dr. 

Re: + in regular expression

2012-10-09 Thread Duncan Booth
Cameron Simpson c...@zip.com.au wrote: | Because \s{6}+ | has other meanings in different regex syntaxes and the designers didn't | want confusion? I think Python REs are supposed to be Perl compatible; ISTR an opening sentence to that effect... I don't know the full history of how regex

Re: To get the accurate value of 1 - 0.999999999999999 ,how to implement the python algorithm ?

2012-10-09 Thread Steven D'Aprano
On Tue, 09 Oct 2012 02:00:04 +1100, Chris Angelico wrote: On Tue, Oct 9, 2012 at 1:48 AM, Dave Angel d...@davea.name wrote: import decimal a = decimal.Decimal(4.3) print(a) 5.0996447286321199499070644378662109375 Ah, the delights of copy-paste :) The Decimal class has the

Re: Insert item before each element of a list

2012-10-09 Thread Duncan Booth
mooremath...@gmail.com wrote: What's the best way to accomplish this? Am I over-complicating it? My gut feeling is there is a better way than the following: import itertools x = [1, 2, 3] y = list(itertools.chain.from_iterable(('insertme', x[i]) for i in range(len(x y ['insertme',

Re: pydelicious documentation

2012-10-09 Thread Alec Taylor
Hi Professor Soto, Not sure what's going on with their servers', but I was able to find the documentation on their repo: https://pydelicious.googlecode.com/svn/trunk/doc/htmlref/index.html https://pydelicious.googlecode.com/svn/trunk/doc/htmlref/HACKING.html

Re: pydelicious documentation

2012-10-09 Thread Alec Taylor
Actually it seems this project has been official abandoned. Unofficially use this, was updated only a month ago: https://github.com/mgan59/python-pinboard On Tue, Oct 9, 2012 at 10:47 PM, Alec Taylor alec.tayl...@gmail.com wrote: Hi Professor Soto, Not sure what's going on with their

Creating a dictionary

2012-10-09 Thread argbsk
below is the text file i have How to create Facility as a key and then assign multiple values to it FACILITY : BACKUP FAILED BACKUP_BEFORE FAILED BACKUP_INTERCHANGE Total : 34 Passed : 32 Failed : 2 Not Run : 0 FACILITY : CDU Total : 9 Passed : 9 Failed : 0 for example Facility BACKUP is a

Re: Insert item before each element of a list

2012-10-09 Thread Steven D'Aprano
On Mon, 08 Oct 2012 19:34:26 -0700, rusi wrote: How about a 2-paren version? x = [1,2,3] reduce(operator.add, [['insert', a] for a in x]) ['insert', 1, 'insert', 2, 'insert', 3] That works, but all those list additions are going to be slow. It will be an O(N**2) algorithm. If you're

Re: mangled messages (was: Unpaking Tuple)

2012-10-09 Thread Jussi Piitulainen
Tim Chase writes: On 10/09/12 02:22, Jussi Piitulainen wrote: in 682592 20121008 232126 Prasad, Ramit wrote: [snip mess] How does one unpack this post? ;-) Since that's not the way it arrived here, i have to ask, how do you get these posts? I see a carriage return rendered as ^M

Re: Blue Screen Python

2012-10-09 Thread mikcec82
Il giorno venerdì 21 settembre 2012 16:04:48 UTC+2, mikcec82 ha scritto: Hallo to all, I'm using Python 2.7.3 with Windows 7 @ 64 bit and an Intel Core i3 -2350M CPU @2.30GHz 2.3GHz. Sometimes, when I'm programming in Python on my screen compare this blue screen:

Re: Insert item before each element of a list

2012-10-09 Thread Peter Otten
Duncan Booth wrote: mooremath...@gmail.com wrote: What's the best way to accomplish this? Am I over-complicating it? My gut feeling is there is a better way than the following: import itertools x = [1, 2, 3] y = list(itertools.chain.from_iterable(('insertme', x[i]) for i in

Re: Creating a dictionary

2012-10-09 Thread Steven D'Aprano
On Tue, 09 Oct 2012 04:59:49 -0700, argbsk wrote: below is the text file i have How to create Facility as a key and then assign multiple values to it To use Facility as a key in a dict: d = {} d['Facility'] = 'ham' Note that keys are case-sensitive, so that 'Facility', 'facility',

Re: Creating a dictionary

2012-10-09 Thread Roy Smith
In article 50741ffe$0$6574$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Tue, 09 Oct 2012 04:59:49 -0700, argbsk wrote: below is the text file i have How to create Facility as a key and then assign multiple values to it To use

Re: Creating a dictionary

2012-10-09 Thread Ulrich Eckhardt
Am 09.10.2012 13:59, schrieb arg...@gmail.com: below is the text file i have How to create Facility as a key and then assign multiple values to it The value part of a dict element can be any kind of object, like e.g. a tuple, namedtuple or even a dict. Uli --

RE: Fastest web framework

2012-10-09 Thread Andriy Kornatskyy
How fast python web framework process routing (URL dispatch)? Here is a benchmark for various web frameworks (bottle, django, flask, pyramid, tornado and wheezy.web) running the following routing: static, dynamic, SEO and missing... with a trivial 'hello world' application (all routes are

Re: Private methods

2012-10-09 Thread Mark Lawrence
On 09/10/2012 14:24, D.M. Procida wrote: What exactly is the point of a private method? Why or when would I want to use one? Daniele Hardly a Python question but using a search engine could have got you here, and rather faster :)

Re: Private methods

2012-10-09 Thread D.M. Procida
Mark Lawrence breamore...@yahoo.co.uk wrote: On 09/10/2012 14:24, D.M. Procida wrote: What exactly is the point of a private method? Why or when would I want to use one? Daniele Hardly a Python question but using a search engine could have got you here, and rather faster :)

string contains and special characters

2012-10-09 Thread loial
I am trying to match a string that containing the and characters, using the string contains function, but it never seems to find the lines containing the string e.g if mystring.contains(TAG) : Do I need to escape the characters...and if so how? --

Re: Private methods

2012-10-09 Thread Demian Brecht
On 12-10-09 06:59 AM, D.M. Procida wrote: In Python, using an underscore is simply a convention to note that a method is private - it doesn't actually hide it from other things - correct? Daniele A single underscore semantically means private. A double underscore will name mangle the

Re: Insert item before each element of a list

2012-10-09 Thread mooremathewl
On Monday, October 8, 2012 10:06:50 PM UTC-4, Roy Smith wrote: In article mailman.1976.1349747963.27098.python-l...@python.org, (big snip) y = list(itertools.chain.from_iterable(('insertme', x[i]) for i in range(len(x A statement ending in four close parens is usually

Re: Private methods

2012-10-09 Thread Robert Kern
On 10/9/12 2:59 PM, D.M. Procida wrote: Mark Lawrence breamore...@yahoo.co.uk wrote: On 09/10/2012 14:24, D.M. Procida wrote: What exactly is the point of a private method? Why or when would I want to use one? Daniele Hardly a Python question but using a search engine could have got you

Re: Unpaking Tuple

2012-10-09 Thread Grant Edwards
On 2012-10-09, Bob Martin bob.mar...@excite.com wrote: in 682592 20121008 232126 Prasad, Ramit ramit.pra...@jpmorgan.com wrote: Thomas Bach wrote:=0D=0A Hi there,=0D=0A =0D=0A On Sat, Oct 06, 2012 at = 03:08:38PM +, Steven D'Aprano wrote:=0D=0A =0D=0A my_tuple =3D my_= tuple[:4]=0D=0A

Re: string contains and special characters

2012-10-09 Thread Agon Hajdari
On 10/09/2012 04:02 PM, loial wrote: I am trying to match a string that containing the and characters, using the string contains function, but it never seems to find the lines containing the string e.g if mystring.contains(TAG) : Do I need to escape the characters...and if so how?

Re: Private methods

2012-10-09 Thread Tim Chase
On 10/09/12 08:59, D.M. Procida wrote: On 09/10/2012 14:24, D.M. Procida wrote: What exactly is the point of a private method? Why or when would I want to use one? In Python, using an underscore is simply a convention to note that a method is private - it doesn't actually hide it from other

Re: string contains and special characters

2012-10-09 Thread Dave Angel
On 10/09/2012 10:02 AM, loial wrote: I am trying to match a string that containing the and characters, using the string contains function, but it never seems to find the lines containing the string e.g if mystring.contains(TAG) : Do I need to escape the characters...and if so how?

Re: mangled messages

2012-10-09 Thread Tim Chase
On 10/09/12 07:05, Jussi Piitulainen wrote: Tim Chase writes: However, it might be that there is no CR+LF on the last line, or that one line is missing the CR, so your viewer heuristic (vim does this) thinks it has Unix NL-only line-endings and shows the ^M on all the lines that have the CR.

Re: string contains and special characters

2012-10-09 Thread Dave Angel
On 10/09/2012 10:23 AM, Dave Angel wrote: On 10/09/2012 10:02 AM, loial wrote: I am trying to match a string that containing the and characters, using the string contains function, but it never seems to find the lines containing the string e.g if mystring.contains(TAG) : Do I need to

Re: string contains and special characters

2012-10-09 Thread Jerry Hill
On Tue, Oct 9, 2012 at 10:02 AM, loial jldunn2...@gmail.com wrote: I am trying to match a string that containing the and characters, using the string contains function, but it never seems to find the lines containing the string e.g if mystring.contains(TAG) : Do I need to escape the

Re: string contains and special characters

2012-10-09 Thread Mark Lawrence
On 09/10/2012 15:23, Dave Angel wrote: On 10/09/2012 10:02 AM, loial wrote: I am trying to match a string that containing the and characters, using the string contains function, but it never seems to find the lines containing the string e.g if mystring.contains(TAG) : Do I need to escape

Re: string contains and special characters

2012-10-09 Thread loial
On Tuesday, 9 October 2012 15:19:33 UTC+1, Agon Hajdari wrote: On 10/09/2012 04:02 PM, loial wrote: I am trying to match a string that containing the and characters, using the string contains function, but it never seems to find the lines containing the string e.g if

surprising behaviour of global dictionaries

2012-10-09 Thread Michele Simionato
I have the following module implementing a registry of functions with a decorator: $ cat x.py registry = {} # global dictionary def dec(func): registry[func.__name__] = func print registry, id(registry) return func if __name__ == '__main__': import xlib print registry,

Re: string contains and special characters

2012-10-09 Thread Ulrich Eckhardt
Am 09.10.2012 16:02, schrieb loial: I am trying to match a string that containing the and characters, using the string contains function, but it never seems to find the lines containing the string e.g if mystring.contains(TAG) : I can't locate a 'contains' function anywhere, what type is

Re: surprising behaviour of global dictionaries

2012-10-09 Thread Peter Otten
Michele Simionato wrote: I have the following module implementing a registry of functions with a decorator: $ cat x.py registry = {} # global dictionary def dec(func): registry[func.__name__] = func print registry, id(registry) return func if __name__ == '__main__':

Re: surprising behaviour of global dictionaries

2012-10-09 Thread Michele Simionato
On Tuesday, October 9, 2012 5:24:17 PM UTC+2, Peter Otten wrote: Seriously, you shouldn't use the main script as a library; it is put into the sys.modules cache under the __main__ key. Subsequent imports under its real name will not find that name in the cache and import another instance

Re: surprising behaviour of global dictionaries

2012-10-09 Thread Grant Edwards
On 2012-10-09, Peter Otten __pete...@web.de wrote: Welcome to python -- this is a trap every newbie falls into ;) Seriously, you shouldn't use the main script as a library; There must be something wrong with me. It never even occurred to me to try to import a file from within that same file.

Generating C++ code

2012-10-09 Thread Jean-Michel Pichavant
Greetings, I'm trying to generate C++ code from an XML file. I'd like to use a template engine, which imo produce something readable and maintainable. My google search about this subject has been quite unsuccessful, I've been redirected to template engine specific to html mostly. Does anybody

Re: wordnet semantic similarity: how to refer to elements of a pair in a list? can we sort dictionary according to the value?

2012-10-09 Thread Token Type
Thanks indeed for your tips. Now I understand the difference between tuples and dictionaries deeper. -- http://mail.python.org/mailman/listinfo/python-list

Re: surprising behaviour of global dictionaries

2012-10-09 Thread Dave Angel
On 10/09/2012 11:36 AM, Michele Simionato wrote: On Tuesday, October 9, 2012 5:24:17 PM UTC+2, Peter Otten wrote: Seriously, you shouldn't use the main script as a library; it is put into the sys.modules cache under the __main__ key. Subsequent imports under its real name will not find

RE: RE: Unpaking Tuple

2012-10-09 Thread Prasad, Ramit
Bob Martin wrote in 682592 20121008 232126 Prasad, Ramit ramit.pra...@jpmorgan.com wrote: Thomas Bach wrote:=0D=0A Hi there,=0D=0A =0D=0A On Sat, Oct 06, 2012 at = 03:08:38PM +, Steven D'Aprano wrote:=0D=0A =0D=0A my_tuple =3D my_= tuple[:4]=0D=0A a,b,c,d =3D my_tuple if len(my_tuple)

Re: FW: question Python custome events

2012-10-09 Thread Ian Kelly
On Tue, Oct 9, 2012 at 2:35 AM, Hussain, Mushabbar mushabbar.huss...@honeywell.com wrote: Hi, Is it possible to define an Event which should fire when a value of a variable changes? Something like below self.Bind(wx.EVT_ON_VAL_CHANGE, variable_to_watch, self.Callback) I need a Text

Re: surprising behaviour of global dictionaries

2012-10-09 Thread Peter Otten
Grant Edwards wrote: On 2012-10-09, Peter Otten __pete...@web.de wrote: Welcome to python -- this is a trap every newbie falls into ;) Seriously, you shouldn't use the main script as a library; There must be something wrong with me. It never even occurred to me to try to import a file

Getting ipython notebook to plot inline

2012-10-09 Thread Frank Franklin
I've just managed to install ipython and get it to run by typing ipython notebook --pylab=inline Now I'm getting the following error when I try to plot something in ipython notebook: AttributeError: 'module' object has no attribute 'FigureCanvas' I've tried using imports to make this work:

Re: Generating C++ code

2012-10-09 Thread Andrea Crotti
On 10/09/2012 05:00 PM, Jean-Michel Pichavant wrote: Greetings, I'm trying to generate C++ code from an XML file. I'd like to use a template engine, which imo produce something readable and maintainable. My google search about this subject has been quite unsuccessful, I've been redirected to

Re: Generating C++ code

2012-10-09 Thread Etienne Robillard
On Tue, 09 Oct 2012 20:55:48 +0100 Andrea Crotti andrea.crott...@gmail.com wrote: On 10/09/2012 05:00 PM, Jean-Michel Pichavant wrote: Greetings, I'm trying to generate C++ code from an XML file. I'd like to use a template engine, which imo produce something readable and maintainable.

share with friends

2012-10-09 Thread admin
HotNet1 hi, join small social bookmarking and share best links with pepole. Please share your friends.We are waiting for you. thank you HotNet1 team http://www.hotnet1.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Private methods

2012-10-09 Thread Steven D'Aprano
On Tue, 09 Oct 2012 11:08:13 -0600, Ian Kelly wrote: On Tue, Oct 9, 2012 at 8:08 AM, Demian Brecht demianbre...@gmail.com wrote: A single underscore semantically means private. A double underscore will name mangle the function such that it's only accessible strictly by name through the class

Re: Private methods

2012-10-09 Thread Demian Brecht
On 12-10-09 04:51 PM, Steven D'Aprano wrote: Really? I tend to view name mangling as a waste of time, and complex inheritance structures as something to avoid. Yep, I've been coming around to this as of late. -- Demian Brecht @demianbrecht http://demianbrecht.github.com --

an error in python lib?

2012-10-09 Thread Wenhua Zhao
Hi list, I just noticed that in /usr/lib/python2.7/threading.py class _Condition(_Verbose): ... def _is_owned(self): # Return True if lock is owned by current_thread. # This method is called only if __lock doesn't have _is_owned(). if self.__lock.acquire(0):

Re: IDLE Crashing in Mac OS 10.8.2 with 2.7.3

2012-10-09 Thread Kevin Walzer
On 10/9/12 11:27 AM, bkee...@gmail.com wrote: I've tried all the usual suspect of uninstalling and reinstalling IDLE and Python 2.7.3, but my IDLE environment always crashes unexpectedly on Mac OS X 10.8. Where did you get Python? What version of Tcl/Tk do you have installed? Is it the one

Porting notmm to pep 3333 and mod_wsgi

2012-10-09 Thread Etienne Robillard
Hi, Has PEP- introduced backward incompatibilities or changes in unicode encoding and decoding or should this updated pep require python 3 to make mod_wsgi working with wsgi 1.0 (pep-333) scripts ? Moreover is it possible to use python 2.7 with mod_wsgi at all without the utf-8 encoding

Re: an error in python lib?

2012-10-09 Thread MRAB
On 2012-10-10 01:32, Wenhua Zhao wrote: Hi list, I just noticed that in /usr/lib/python2.7/threading.py class _Condition(_Verbose): ... def _is_owned(self): # Return True if lock is owned by current_thread. # This method is called only if __lock doesn't have

communicate with external process via pty

2012-10-09 Thread Tim Arnold
I have an external process, 'tralics' that emits mathml when you feed it latex equations. I want to get that mathml into a string. The problem for me is that tralics wants to talk to a tty and I've never done that before; it basically starts its own subshell. I have the following code which

lxml 3.0 final released - efficient XML and HTML processing with Python

2012-10-09 Thread Stefan Behnel
Hi everyone, it's been a while since the last stable release series appeared, so I'm proud to announce the final release of lxml 3.0. http://lxml.de/ http://pypi.python.org/pypi/lxml/3.0 Changelog: http://lxml.de/changes-3.0.html In short, lxml is the most feature-rich and easy-to-use library

[issue16115] test that executable arg to Popen() takes precedence over args

2012-10-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3dd012397b11 by Chris Jerdonek in branch '3.2': Issue #16115: Improve subprocess.Popen() documentation around args, shell, and executable arguments. http://hg.python.org/cpython/rev/3dd012397b11 New changeset 0ef3b801ccbc by Chris Jerdonek in

[issue16115] test that executable arg to Popen() takes precedence over args

2012-10-09 Thread Chris Jerdonek
Changes by Chris Jerdonek chris.jerdo...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16115

[issue16141] Possible simplification for logging.StreamHandler exception handling

2012-10-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 46889b772442 by Vinay Sajip in branch 'default': Issue #16141: replaced old-style exception handling code in logging with the modern idiom. http://hg.python.org/cpython/rev/46889b772442 -- nosy: +python-dev

[issue16161] broken link to Visual Studio 2008 in devguide

2012-10-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6f3e48838a2d by Chris Jerdonek in branch 'default': Issue #16161: Update link for downloading Microsoft Visual Studio 2008. http://hg.python.org/devguide/rev/6f3e48838a2d -- nosy: +python-dev ___ Python

[issue16161] broken link to Visual Studio 2008 in devguide

2012-10-09 Thread Chris Jerdonek
Changes by Chris Jerdonek chris.jerdo...@gmail.com: -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16161

[issue16141] Possible simplification for old-style exception handling code in stdlib

2012-10-09 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- assignee: vinay.sajip - title: Possible simplification for logging.StreamHandler exception handling - Possible simplification for old-style exception handling code in stdlib ___ Python tracker

[issue16168] SysLogHandler constructor ignores socktype arg when address refers to a Unix Domain Socket

2012-10-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6e31832f8275 by Vinay Sajip in branch '2.7': Issue #16168: Use specified socket type for domain sockets in SysLogHandler. http://hg.python.org/cpython/rev/6e31832f8275 New changeset f41e6ef3392a by Vinay Sajip in branch '3.2': Issue #16168: Use

[issue15922] make howto/urllib2.rst doctests pass

2012-10-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset a6f37d503878 by Senthil Kumaran in branch '3.2': Fix Issue 15922: make howto/urllib2.rst doctests pass. http://hg.python.org/cpython/rev/a6f37d503878 New changeset a24d3e2124b6 by Senthil Kumaran in branch '3.3': Fix Issue 15922: make

[issue16114] incorrect path in subprocess.Popen() FileNotFoundError message

2012-10-09 Thread Chris Jerdonek
Chris Jerdonek added the comment: BTW, the patch fails for 3.2 and 3.3 but works for 3.4 By patch do you mean test? And by works, do you mean fails or succeeds? :) I haven't prepared a patch yet, but I just started working on it. On my machine, I found that the test fails as is on 3.3 and

[issue15922] make howto/urllib2.rst doctests pass

2012-10-09 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks, Senthil! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15922 ___ ___ Python-bugs-list mailing list

[issue16114] incorrect path in subprocess.Popen() FileNotFoundError message

2012-10-09 Thread Chris Jerdonek
Changes by Chris Jerdonek chris.jerdo...@gmail.com: -- assignee: - chris.jerdonek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16114 ___ ___

[issue15922] make howto/urllib2.rst doctests pass

2012-10-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset b2f282991973 by Senthil Kumaran in branch '2.7': Fix Issue 15922: make howto/urllib2.rst doctests pass. http://hg.python.org/cpython/rev/b2f282991973 -- ___ Python tracker rep...@bugs.python.org

[issue15922] make howto/urllib2.rst doctests pass

2012-10-09 Thread Senthil Kumaran
Changes by Senthil Kumaran sent...@uthcode.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15922 ___

[issue14039] Add metavar argument to add_subparsers() in argparse

2012-10-09 Thread Kushal Das
Changes by Kushal Das kushal...@gmail.com: -- nosy: +kushaldas ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14039 ___ ___ Python-bugs-list

[issue16110] Provide logging.config.configParserConfig

2012-10-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset ce0d0d052494 by Vinay Sajip in branch 'default': Closes #16110: fileConfig now accepts a pre-initialised ConfigParser instance. http://hg.python.org/cpython/rev/ce0d0d052494 -- nosy: +python-dev resolution: - fixed stage: -

[issue16171] do nothing load_tests could be improved

2012-10-09 Thread Antoine Pitrou
New submission from Antoine Pitrou: unittest docs suggest the following load_tests for a __main__.py: def load_tests(loader, standard_tests, pattern): # top level directory cached on loader instance this_dir = os.path.dirname(__file__) package_tests =

[issue16119] Python 2.7 _socket DLL import error on Windows Vista

2012-10-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Note: the error message above is mojibake (cp1253-encoded message written to a cp737 console) for: Δεν ήταν δυνατό να εντοπιστεί η καθορισμένη μονάδα (The specified module could not be found) Spiros, you closed the issue. How did you fix it exactly?

[issue16061] performance regression in string replace for 3.3

2012-10-09 Thread Kushal Das
Changes by Kushal Das kushal...@gmail.com: -- nosy: +kushaldas ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16061 ___ ___ Python-bugs-list

[issue16171] do nothing load_tests could be improved

2012-10-09 Thread Michael Foord
Michael Foord added the comment: Yes the version of load_tests you show is better. However there is an outstanding issue to fix the load_tests protocol to work with pattern=None which is a better fix. (I think this is a bug in load_tests rather than a doc issue really.) Issue 11218.

[issue11218] pattern=None when following documentation for load_tests and unittest.main()

2012-10-09 Thread Michael Foord
Michael Foord added the comment: Changing the docs to the following fixes the original reported issue: def load_tests(loader, standard_tests, pattern): # top level directory cached on loader instance this_dir = os.path.dirname(__file__) pattern = pattern or test_*.py

[issue16125] open accepts arbitrary mode strings as long as they contain U

2012-10-09 Thread Kushal Das
Kushal Das added the comment: So, should I submit a new patch which will just put a warning ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16125 ___

[issue15574] IDLE crashes using clipboard copy command on OS X with ActiveTcl 8.5.12

2012-10-09 Thread Ned Deily
Ned Deily added the comment: I've been able to isolate the problem to a particular Tk checkin and have opened an Tk issue with details here: https://sourceforge.net/tracker/?func=detailaid=3575681group_id=12997atid=112997 -- ___ Python tracker

[issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1

2012-10-09 Thread Ned Deily
Ned Deily added the comment: I've been able to build Cocoa Tk and isolate the crash regression to a particular Tk checkin. This Tk issue contains the details: https://sourceforge.net/tracker/?func=detailatid=112997aid=3575664group_id=12997 -- ___

[issue16172] Fix is/== misuse

2012-10-09 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Here are two patches written on the discussion in Python-Ideas [1]. The first patch fixes incorrect use of x is 0 or x is 'foo'. Result of this operations is implementation details. The second patch changes non-idiomatic use of x == None or x == True.

[issue16172] Fix is/== misuse

2012-10-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file27504/equals_none_or_bool.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16172 ___

[issue16172] Fix is/== misuse

2012-10-09 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- components: +Tests nosy: +ezio.melotti stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16172 ___

[issue16170] remove Linux skip from test_subprocess's test_executable() test

2012-10-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Try prefixing doesnotexist with the same dirname as sys.executable (i.e. `os.path.join(os.path.dirname(sys.executable), doesnotexist)`). Python under Unix uses its own path to determine where the standard library is, and it does so by inspecting argv[0].

[issue16166] Add PY_BYTE_ORDER macro to get endianess of platform

2012-10-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: If you prefer two macros instead of three then we should name them PY_IS_LITTLE_ENDIAN and PY_IS_BIG_ENDIAN. Fine with me. Having three macros is pointless complication. If I understand you correctly than we can't have a configure definition and need

[issue16173] Wrong offset on SyntaxError when identifier contains non-ascii characters

2012-10-09 Thread Baptiste Mispelon
New submission from Baptiste Mispelon: When a syntax error happens, the exception that gets printed has an extra line with a caret that helps locate the error. If the line also contains an identifier with non-ascii characters, then this caret is misaligned (too far on the right). I've

[issue16173] Wrong offset on SyntaxError when identifier contains non-ascii characters

2012-10-09 Thread Ezio Melotti
Ezio Melotti added the comment: See #2382. -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16173 ___ ___ Python-bugs-list

[issue16174] Fix suggested usage of dummy_threading module

2012-10-09 Thread Berker Peksag
New submission from Berker Peksag: The suggested usage should be like this: try: import threading except ImportError: import dummy_threading as threading See: - http://hg.python.org/cpython/file/ce0d0d052494/Lib/queue.py#l3 -

[issue16164] there is no easy way to force unittest.main to use stdout rather than stderr

2012-10-09 Thread Michael Foord
Michael Foord added the comment: Unfortunately subclassing core components is the *intended* mechanism for customising unittest behaviour. Changing this is possible, but is a big job with very extensive changes. I don't think this request is *invalid* per-se, but it isn't something that

[issue16174] Fix suggested usage of dummy_threading module

2012-10-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7de9c620716e by Andrew Svetlov in branch '3.2': Issue #16174: Fix suggested usage of dummy_threading module. http://hg.python.org/cpython/rev/7de9c620716e New changeset f02974773a71 by Andrew Svetlov in branch '3.3': Merge issue #16174: Fix

[issue16174] Fix suggested usage of dummy_threading module

2012-10-09 Thread Andrew Svetlov
Andrew Svetlov added the comment: Fixed. Thanks, Berker. -- nosy: +asvetlov resolution: - fixed stage: - committed/rejected status: open - closed versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16174

[issue16162] Py_FileSystemDefaultEncoding should be updated on locale.setlocale()

2012-10-09 Thread Michael Vogt
Michael Vogt added the comment: Thanks for this detailed explaination! I will workaround this outside of python (that is easy ;) - I just thought that it would be a good idea to be able to change the fsencoding (and therefore send the patch), but in the light of e.g. sys.path it seems to be

[issue16169] ctypes.WinError() confuses errno with winerror

2012-10-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset a3d65edc3b04 by Richard Oudkerk in branch '3.3': Issue #16169: Fix ctypes.WinError()'s confusion between errno and winerror http://hg.python.org/cpython/rev/a3d65edc3b04 New changeset d3c4dcd9a048 by Richard Oudkerk in branch 'default': Issue

[issue15641] Clean up importlib for Python 3.4

2012-10-09 Thread Brett Cannon
Brett Cannon added the comment: Finder is only documented as deprecated; actually making it work with a reasonable warning is too much of a pain for such little gain. So it can just stay in as there is no maintenance burden. -- ___ Python tracker

[issue15111] Wrong ImportError message with importlib

2012-10-09 Thread Brett Cannon
Brett Cannon added the comment: This can get fixed in 3.3.1, which is why I left Python 3.3 as an affected version. Hopefully I can get to a fix this week. I need to write a test showing that a module that doesn't exist as specified in a fromlist is silently ignored, but if a module in a

[issue12322] ElementPath 1.3 expressions documentation

2012-10-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 79231a12567a by Eli Bendersky in branch '3.3': Issue #12322: clarify xpath reference for cases where the path reaches ancestors of the start element. Also add missing markup for a None. Thanks to patrick vrijlandt and Mike Hoy for the report and

  1   2   >