Script suddenly stops

2014-05-30 Thread Chris
Dear All, I'm trying to read ten 200 MB textfiles into a MySQL MyISAM database (Linux, ext4). The script output is suddenly stopping, while the Python process is still running (or should I say sleeping?). It's not in top, but in ps visible. Why is it stopping? Is there a way to make it continue,

Re: Multi-line commands with 'python -c'

2014-05-30 Thread Rustom Mody
On Friday, May 30, 2014 6:22:24 AM UTC+5:30, Chris Angelico wrote: Since lines are so critical to Python syntax, I'm a little surprised there's no majorly obvious solution to this... or maybe I'm just blind. Problem: Translate this into a shell one-liner: import os for root, dirs, files in

Re: How to run script from interpreter?

2014-05-30 Thread Steven D'Aprano
On Fri, 30 May 2014 12:04:27 +1000, Chris Angelico wrote: On Fri, May 30, 2014 at 11:49 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Fri, 30 May 2014 10:46:34 +1000, Chris Angelico wrote: On Fri, May 30, 2014 at 10:33 AM, Steven D'Aprano

Re: Multi-line commands with 'python -c'

2014-05-30 Thread Rustom Mody
On Friday, May 30, 2014 11:34:36 AM UTC+5:30, Rustom Mody wrote: On Friday, May 30, 2014 6:22:24 AM UTC+5:30, Chris Angelico wrote: Since lines are so critical to Python syntax, I'm a little surprised there's no majorly obvious solution to this... or maybe I'm just blind. Problem:

Re: Multi-line commands with 'python -c'

2014-05-30 Thread Rustom Mody
On Friday, May 30, 2014 12:15:46 PM UTC+5:30, Rustom Mody wrote: Heres a (pr) approx $ python -c 'import os, pprint; pprint.pprint ([ r for r, d, f in os.walk(.) if len(d+f) != 1])' Without pprint: (pooor) python -c 'import os; print \n.join([ r for r, d, f in os.walk(.) if len(d+f)

Re: Script suddenly stops

2014-05-30 Thread dieter
Chris ch2...@arcor.de writes: I'm trying to read ten 200 MB textfiles into a MySQL MyISAM database (Linux, ext4). The script output is suddenly stopping, while the Python process is still running (or should I say sleeping?). It's not in top, but in ps visible. Why is it stopping? Is there a

Re: How to run script from interpreter?

2014-05-30 Thread Chris Angelico
On Fri, May 30, 2014 at 4:20 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: It's on par with creating a file with a name beginning with a hyphen, and then fiddling around with various commands as you try to manipulate it (tip: rm ./-r works); programs will happily interpret -r

Re: Multi-line commands with 'python -c'

2014-05-30 Thread Chris Angelico
On Fri, May 30, 2014 at 4:04 PM, Rustom Mody rustompm...@gmail.com wrote: I thought when one signs up for python one has to sign an affidavit saying: I shall not write one-liners\n * 100 Certainly not. I write all my list comps on one line! *ducking for cover* ChrisA --

Re: IDE for python

2014-05-30 Thread Andrea D'Amore
On 2014-05-29 22:40:36 +, Travis Griggs said: I use either vim or textwrangler for simple one file scripts. Since you're on OS X have a look at Exedore, it's paid but very cheap. It aims at providing a beautiful interface, I fetched the free trial a couple days ago and the job so far is

Re: Script suddenly stops

2014-05-30 Thread Peter Otten
Chris wrote: Dear All, I'm trying to read ten 200 MB textfiles into a MySQL MyISAM database (Linux, ext4). The script output is suddenly stopping, while the Python process is still running (or should I say sleeping?). It's not in top, but in ps visible. Why is it stopping? Is there a

Re: Multi-line commands with 'python -c'

2014-05-30 Thread Peter Otten
Rustom Mody wrote: On Friday, May 30, 2014 12:15:46 PM UTC+5:30, Rustom Mody wrote: Heres a (pr) approx $ python -c 'import os, pprint; pprint.pprint ([ r for r, d, f in os.walk(.) if len(d+f) != 1])' Without pprint: (pooor) python -c 'import os; print \n.join([ r for r, d, f in

Re: PythonCE successfully inst'ed, but scripts don't work. Please help.

2014-05-30 Thread Chris Angelico
On Fri, May 30, 2014 at 1:12 PM, Abdullah Indorewala pwnapplei...@icloud.com wrote: Hi, I know you posted this 15 years ago but I recently stumbled across your post here : https://mail.python.org/pipermail/python-list/1999-May/018340.html And I am in the same situation (kind of). I can’t

Re: how avoid delay while returning from C-python api?

2014-05-30 Thread Lakshmipathi.G
Yes, Cython looks easier but the problem its a very old code ( 6 or 7 years ). Almost entire code base uses plain python-c api. Thanks for the example, will use Cython or Ctypes way for side-projects! Cheers, Lakshmipathi.G FOSS Programmer. www.giis.co.in/readme.html --

Re: IDE for python

2014-05-30 Thread Andrea D'Amore
On 2014-05-30 07:21:52 +, Andrea D'Amore said: It aims at providing a beautiful interface, Side note: the text editing is still green. -- Andrea -- https://mail.python.org/mailman/listinfo/python-list

Re: How to run script from interpreter?

2014-05-30 Thread Steven D'Aprano
On Fri, 30 May 2014 17:19:00 +1000, Chris Angelico wrote: On Fri, May 30, 2014 at 4:20 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: It's on par with creating a file with a name beginning with a hyphen, and then fiddling around with various commands as you try to manipulate

Re: How to run script from interpreter?

2014-05-30 Thread Chris Angelico
On Fri, May 30, 2014 at 9:27 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: This is why I'm so adamant that, while REPLs may be permitted to introduce *new* syntax which is otherwise illegal to the Python parser, (e.g. like IPython's %magic and !shell commands) they *must not*

Re: IDE for python

2014-05-30 Thread alister
On Thu, 29 May 2014 15:11:31 -0500, Mark H Harris wrote: On 5/29/14 11:44 AM, Paul Rudin wrote: Terry Reedy tjre...@udel.edu writes: I am curious how many of the editors people have been recommending have all of the following Idle features, that I use constantly. 1. Run code in the editor

Re: Multi-line commands with 'python -c'

2014-05-30 Thread Rustom Mody
On Friday, May 30, 2014 12:50:31 PM UTC+5:30, Chris Angelico wrote: On Fri, May 30, 2014 at 4:04 PM, Rustom Mody wrote: I thought when one signs up for python one has to sign an affidavit saying: I shall not write one-liners\n * 100 Certainly not. I write all my list comps on one line!

Re: IDE for python

2014-05-30 Thread Rustom Mody
On Thursday, May 29, 2014 10:14:35 PM UTC+5:30, Paul Rudin wrote: Terry Reedy writes: 3. Search unopened files (grep) for a string or re. Emacs. How do you do this with emacs? I find a menagerie of greppish commands -- rgrep, lgrep, grep-find etc --

Re: Multi-line commands with 'python -c'

2014-05-30 Thread Chris Angelico
On Fri, May 30, 2014 at 10:47 PM, Rustom Mody rustompm...@gmail.com wrote: On Friday, May 30, 2014 12:50:31 PM UTC+5:30, Chris Angelico wrote: On Fri, May 30, 2014 at 4:04 PM, Rustom Mody wrote: I thought when one signs up for python one has to sign an affidavit saying: I shall not write

Re: IDE for python

2014-05-30 Thread Marko Rauhamaa
Rustom Mody rustompm...@gmail.com: 3. Search unopened files (grep) for a string or re. How do you do this with emacs? I find a menagerie of greppish commands -- rgrep, lgrep, grep-find etc To grep for a pattern in the directory of the active buffer: M-x grep Run grep (like this):

Re: IDE for python

2014-05-30 Thread Rustom Mody
On Friday, May 30, 2014 7:24:10 PM UTC+5:30, Marko Rauhamaa wrote: Rustom Mody wrote: 3. Search unopened files (grep) for a string or re. How do you do this with emacs? I find a menagerie of greppish commands -- rgrep, lgrep, grep-find etc To grep for a pattern in the

Optparse to parsing Suggestions !!

2014-05-30 Thread Ganesh Pal
Hello Python world , I wanted suggestion on how to modify the below code to help me accomodate the below two cases # Here is the Sample code. def main(): ---MAIN--- parser = optparse.OptionParser(usage='%prog [options] arg1.]', version='1.0') object_choice =

Re: How to run script from interpreter?

2014-05-30 Thread Terry Reedy
On 5/30/2014 7:46 AM, Chris Angelico wrote: Hmm. I'm not sure that raises SyntaxError is any less a part of the language's promise than evaluates to twice the value of x is. Of course it is. A real SyntaxError cannot be caught immediately.* When new syntax features are added, breaking the

Re: Optparse to parsing Suggestions !!

2014-05-30 Thread Ganesh Pal
On Fri, May 30, 2014 at 7:48 PM, Ganesh Pal ganesh1...@gmail.com wrote: Hello Python world , I wanted suggestion on how to modify the below code to help me accomodate the below two cases # Here is the Sample code. def main(): ---MAIN--- parser =

Re: Multi-line commands with 'python -c'

2014-05-30 Thread Terry Reedy
On 5/30/2014 2:45 AM, Rustom Mody wrote: $ python -c 'import os, pprint; pprint.pprint ([ r for r, d, f in os.walk(.) if len(d+f) != 1])' Mysterious that print after a ; is fine whereas for is not Not at all. Simple statememts can follow ; or :, compound statements cannot. -- Terry Jan

Re: IDE for python

2014-05-30 Thread Terry Reedy
On 5/30/2014 9:54 AM, Marko Rauhamaa wrote: Rustom Mody rustompm...@gmail.com: 3. Search unopened files (grep) for a string or re. How do you do this with emacs? I find a menagerie of greppish commands -- rgrep, lgrep, grep-find etc To grep for a pattern in the directory of the active

Re: Optparse to parsing Suggestions !!

2014-05-30 Thread Peter Otten
Ganesh Pal wrote: Hello Python world , I wanted suggestion on how to modify the below code to help me accomodate the below two cases # Here is the Sample code. def main(): ---MAIN--- parser = optparse.OptionParser(usage='%prog [options] arg1.]', version='1.0')

Re: IDE for python

2014-05-30 Thread Rustom Mody
On Friday, May 30, 2014 8:36:54 PM UTC+5:30, wxjm...@gmail.com wrote: Out of curiosity. Are you the Rusi Mody attempting to dive in Xe(La)TeX? Yeah :-) As my blog posts labelled unicode will indicate I am a fan of using unicode in program source: http://blog.languager.org/search/label/Unicode

Re: IDE for python

2014-05-30 Thread Terry Reedy
On 5/30/2014 12:15 PM, Rustom Mody wrote: And for those who dont know xetex, its is really xɘtex – a pictorial anagram if written as XƎTEX I believe you mean 'pictorial palindrome', which it is! -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: IDE for python

2014-05-30 Thread Mark Lawrence
On 30/05/2014 17:15, Rustom Mody wrote: On Friday, May 30, 2014 8:36:54 PM UTC+5:30, wxjm...@gmail.com wrote: It is now about time that we stop taking ASCII seriously!! This can't happen in the Python world until there is a sensible approach to unicode. Ah, but wait a minute, the ball was

Re: IDE for python

2014-05-30 Thread Rustom Mody
On Friday, May 30, 2014 10:07:21 PM UTC+5:30, Terry Reedy wrote: On 5/30/2014 12:15 PM, Rustom Mody wrote: And for those who dont know xetex, its is really xɘtex – a pictorial anagram if written as XƎTEX I believe you mean 'pictorial palindrome', which it is! Heh! Getting woozy it

Re: IDE for python

2014-05-30 Thread Rustom Mody
On Friday, May 30, 2014 10:08:04 PM UTC+5:30, Mark Lawrence wrote: On 30/05/2014 17:15, Rustom Mody wrote: On Friday, May 30, 2014 8:36:54 PM UTC+5:30, jmf wrote: It is now about time that we stop taking ASCII seriously!! This can't happen in the Python world until there is a sensible

Re: IDE for python

2014-05-30 Thread Mark Lawrence
On 30/05/2014 18:07, Rustom Mody wrote: On Friday, May 30, 2014 10:08:04 PM UTC+5:30, Mark Lawrence wrote: On 30/05/2014 17:15, Rustom Mody wrote: On Friday, May 30, 2014 8:36:54 PM UTC+5:30, jmf wrote: It is now about time that we stop taking ASCII seriously!! This can't happen in the

Re: IDE for python

2014-05-30 Thread Rustom Mody
On Friday, May 30, 2014 10:47:33 PM UTC+5:30, wxjm...@gmail.com wrote: = Ok, thanks for the answer. xetex does not quite work whereas pdflatex works smoothly ? Problem is a combination of 1. I am a somewhat clueless noob 2. xetex is emerging technology therefore changing fast and

Re: How to run script from interpreter?

2014-05-30 Thread Steven D'Aprano
On Fri, 30 May 2014 21:46:55 +1000, Chris Angelico wrote: On Fri, May 30, 2014 at 9:27 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: This is why I'm so adamant that, while REPLs may be permitted to introduce *new* syntax which is otherwise illegal to the Python parser,

Re: How to run script from interpreter?

2014-05-30 Thread Chris Angelico
On Sat, May 31, 2014 at 5:28 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Before you ask, there is no absolutely hard and fast line between shell feature and Python code, but the more closely your shell features resemble Python code, the harder it will be for users (power or

Re: daemon thread cleanup approach

2014-05-30 Thread Devin Jeanpierre
Don't use daemon threads, they are inherently un-thread-safe: any global access you do anywhere inside a daemon thread can fail, because daemon threads are still potentially run during interpreter shutdown, when globals are being deleted from every module. Most functions you might call are not

Re: Multi-line commands with 'python -c'

2014-05-30 Thread Duncan Booth
Chris Angelico ros...@gmail.com wrote: Problem: Translate this into a shell one-liner: import os for root, dirs, files in os.walk(.): if len(dirs + files) == 1: print(root) This is one area where Windows seems to do better than Linux shells: PS C:\python33 python -c import os`nfor

Re: Multi-line commands with 'python -c'

2014-05-30 Thread Devin Jeanpierre
In unix shells you can literally use a new line. Or is that only bash? -- Devin On Fri, May 30, 2014 at 2:11 PM, Duncan Booth duncan.booth@invalid.invalid wrote: Chris Angelico ros...@gmail.com wrote: Problem: Translate this into a shell one-liner: import os for root, dirs, files in

Re: daemon thread cleanup approach

2014-05-30 Thread Ethan Furman
On 05/30/2014 01:47 PM, Devin Jeanpierre wrote: Don't use daemon threads, they are inherently un-thread-safe: any global access you do anywhere inside a daemon thread can fail, because daemon threads are still potentially run during interpreter shutdown, when globals are being deleted from

Re: Multi-line commands with 'python -c'

2014-05-30 Thread Chris Angelico
On Sat, May 31, 2014 at 7:42 AM, Devin Jeanpierre jeanpierr...@gmail.com wrote: In unix shells you can literally use a new line. Or is that only bash? You can in bash, I know, but it's fiddly to type it; and more importantly, it's not a good point in the this is cleaner than a series of pipes

Re: daemon thread cleanup approach

2014-05-30 Thread Devin Jeanpierre
On Fri, May 30, 2014 at 1:59 PM, Ethan Furman et...@stoneleaf.us wrote: Given the use-case (must shut down, cannot risk a hung process, orphan files be damned) I don't think having a daemon thread die because it raised an exception trying to access a missing global is a big deal. It's

Re: Script suddenly stops

2014-05-30 Thread Paul McNett
On 5/29/14, 7:47 PM, Chris wrote: I'm trying to read ten 200 MB textfiles into a MySQL MyISAM database (Linux, ext4). The script output is suddenly stopping, while the Python process is still running (or should I say sleeping?). It's not in top, but in ps visible. Does it stop in the same

Yet another simple headscratcher

2014-05-30 Thread Josh English
I am trying to whip up a quick matrix class that can handle multiplication. Should be no problem, except when it fails. --- Begin #!/usr/bin/env python # _*_ coding: utf-8 from operator import mul class Matrix(object): Matrix([data]) Data should be a list of equal sized lists.

Re: Yet another simple headscratcher

2014-05-30 Thread Josh English
Mea culpa, gang. I found it. It had absolutely nothing to do with the multiplication. It was in zero_matrix. I feel like a fool. Josh -- https://mail.python.org/mailman/listinfo/python-list

Re: Yet another simple headscratcher

2014-05-30 Thread Ian Kelly
On Fri, May 30, 2014 at 9:38 PM, Josh English joshua.r.engl...@gmail.com wrote: I am trying to whip up a quick matrix class that can handle multiplication. Should be no problem, except when it fails. [SNIP] def zero_matrix(rows, cols): row = [0] * cols data = [] for r in

Re: Yet another simple headscratcher

2014-05-30 Thread Gary Herron
On 05/30/2014 08:38 PM, Josh English wrote: ... def zero_matrix(rows, cols): row = [0] * cols data = [] for r in range(rows): data.append(row) return Matrix(data) There is a simple and common newbie mistake here.It looks like you are appending several copies

[issue14315] zipfile.ZipFile() unable to open zip File

2014-05-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6dd5e9556a60 by Gregory P. Smith in branch '2.7': Fix issue #14315: The zipfile module now ignores extra fields in the central http://hg.python.org/cpython/rev/6dd5e9556a60 New changeset 33843896ce4e by Gregory P. Smith in branch '3.4': Fix issue

[issue14315] zipfile.ZipFile() unable to open zip File with a short extra header

2014-05-30 Thread Gregory P. Smith
Gregory P. Smith added the comment: This was never an enhancement. zipfile was failing to properly deal with real world data that other zip file tools on the planet were perfectly happy to deal with. That's a bug. Fixed. Practicality beats purity. Be lenient in what you accept. The

[issue21611] int() docstring - unclear what number is

2014-05-30 Thread Dmitry Andreychuk
New submission from Dmitry Andreychuk: https://docs.python.org/3.4/library/functions.html?highlight=int#int The docstring for int() function has these sentences: If x is a number, return x.__int__(). If x is not a number or if base is given... Unfortunately the docstring doesn't describe how

[issue13742] Add a key parameter (like sorted) to heapq.merge

2014-05-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset f5521f5dec4a by Raymond Hettinger in branch 'default': Issue #13742: Add key and reverse parameters to heapq.merge() http://hg.python.org/cpython/rev/f5521f5dec4a -- nosy: +python-dev ___ Python tracker

[issue13742] Add a key parameter (like sorted) to heapq.merge

2014-05-30 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13742 ___

[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

2014-05-30 Thread Sunny K
Sunny K added the comment: Hi Stefan, There is a comment at the top in structseq.c /* Fields with this name have only a field index, not a field name. They are only allowed for indices n_visible_fields. */ char *PyStructSequence_UnnamedField = unnamed field; This is the definition of

[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

2014-05-30 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1820 ___

[issue19048] itertools.tee doesn't have a __sizeof__ method

2014-05-30 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19048 ___

[issue19662] smtpd.py should not decode utf-8

2014-05-30 Thread Maciej Szulik
Maciej Szulik added the comment: I've included Leslie's comments in rst file. The 3rd version is attached in issue19662_v3.patch. -- Added file: http://bugs.python.org/file35409/issue19662_v3.patch ___ Python tracker rep...@bugs.python.org

[issue1185124] pydoc doesn't find all module doc strings

2014-05-30 Thread Sunny K
Changes by Sunny K sunfin...@gmail.com: Removed file: http://bugs.python.org/file31844/myfirst.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1185124 ___

[issue1185124] pydoc doesn't find all module doc strings

2014-05-30 Thread Sunny K
Sunny K added the comment: Hi Victor, can you give this another look? -- versions: +Python 3.5 -Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1185124 ___

[issue21571] Python build should check CPATH, C_INCLUDE_PATH for module dependencies

2014-05-30 Thread Ronald Oussoren
Ronald Oussoren added the comment: I'm pretty sure that I wrote the code Ned refers to, and that's indeed only targeting darwin to avoid breaking other platforms. That code could easily be made actively globally though, the only reason I didn't do so at the time is we were still getting used

[issue21541] Provide configure option --with-ssl for compilation with custom openssl

2014-05-30 Thread Ronald Oussoren
Ronald Oussoren added the comment: Isn't Modules/Setup used for builtin modules? The proposed configure flags are easier to find because similar flags are used by other projects using autoconf. Note that on OSX you could use CFLAGS=-I/path/to/ssl/include LDFLAGS=-L/path/to/ssl/lib, because

[issue21552] String length overflow in Tkinter

2014-05-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 59468bd68789 by Serhiy Storchaka in branch '2.7': Issue #21552: Fixed possible integer overflow of too long string lengths in http://hg.python.org/cpython/rev/59468bd68789 New changeset a90cddfd9e47 by Serhiy Storchaka in branch '3.4': Issue

[issue21592] Make statistics.median run in linear time

2014-05-30 Thread Thomas Dybdahl Ahle
Thomas Dybdahl Ahle added the comment: If you have a good, realistic test set, we can try testing quick-select vs sorting. If it's still not good, I can also reimplement it in C. -- ___ Python tracker rep...@bugs.python.org

[issue20383] Add a keyword-only spec argument to types.ModuleType

2014-05-30 Thread Brett Cannon
Brett Cannon added the comment: Giving Eric is polymorphic first argument to types.ModuleType() is going to be tricky thanks to the fact that it is not hard-coded anywhere in the C code nor documented that the first argument must be a string (the only way it might come up is from

[issue20383] Add a keyword-only spec argument to types.ModuleType

2014-05-30 Thread Brett Cannon
Brett Cannon added the comment: Another issue with the polymorphic argument is that the module type is one of those rare things written in C with keyword parameter support, so renaming the 'name' argument to 'name_or_spec' could potentially break code. --

[issue21608] logging.handlers.HTTPHandler.setFormatter() has no effect

2014-05-30 Thread Bikram Zesto II
Bikram Zesto II added the comment: I see what you are saying about implementation kludginess and will likely subclass just to get my app done. On the other hand, I think the POLA(stonishment) violation of ignoring format-related configuration of the Handler (even tho it is a subclass) matters

[issue21610] load_module not closing opened files

2014-05-30 Thread Brett Cannon
Brett Cannon added the comment: I don't have a Python 2.7 repo handy but the patch LGTM. -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21610 ___

[issue21612] IDLE should should not open multiple instances of one file

2014-05-30 Thread irdb
New submission from irdb: Currently users can open multiple instances of one file in IDLE. Sometimes this leads to confusion and may cause loss of data. I'm not aware of any benefits of this behavior and I think it's better to be prevented by IDLE. Here are the steps to recreate the

[issue21612] IDLE should not open multiple instances of one file

2014-05-30 Thread irdb
Changes by irdb dalba.w...@gmail.com: -- title: IDLE should should not open multiple instances of one file - IDLE should not open multiple instances of one file ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21612

[issue21613] Installer for mac doesn't store the installation location

2014-05-30 Thread Artem Ustinov
New submission from Artem Ustinov: I'm trying to automate the Python uninstallation on mac but I've found that the actual installation location is not stored for Python packages. That location is required since the pkgutil keeps track of installed files (if you run $ pkgutil --files

[issue21477] Idle: improve idle_test.htest

2014-05-30 Thread Saimadhav Heblikar
Changes by Saimadhav Heblikar saimadhavhebli...@gmail.com: Added file: http://bugs.python.org/file35411/htest-docstring-34.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21477 ___

[issue21613] Installer for mac doesn't store the installation location

2014-05-30 Thread Ronald Oussoren
Ronald Oussoren added the comment: According to the manpage pkgutil is used with flat packages. The Python installer users older bundle-style packages. -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21613

[issue21477] Idle: improve idle_test.htest

2014-05-30 Thread Saimadhav Heblikar
Changes by Saimadhav Heblikar saimadhavhebli...@gmail.com: Added file: http://bugs.python.org/file35412/htest-docstring-27.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21477 ___

[issue21476] Inconsitent behaviour between BytesParser.parse and Parser.parse

2014-05-30 Thread R. David Murray
R. David Murray added the comment: I think the code should be using 'detach' after passing the fp to parser.parse, instead of using 'with'. -- versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org

[issue21462] PEP 466: upgrade OpenSSL in the Python 2.7 Windows builds

2014-05-30 Thread Steve Dower
Steve Dower added the comment: I can commit it, though I don't know how it'll affect Benjamin's release branch? (Obviously the build will be fine either way - I had the patch applied for 2.7.7rc1.) -- ___ Python tracker rep...@bugs.python.org

[issue20383] Add a keyword-only spec argument to types.ModuleType

2014-05-30 Thread Eric Snow
Eric Snow added the comment: Yeah, it just looks too complicated to take the ModuleType signature approach, as much as I prefer it. :) I appreciate you taking a look though. -- ___ Python tracker rep...@bugs.python.org

[issue21476] Inconsitent behaviour between BytesParser.parse and Parser.parse

2014-05-30 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the simple patch based on David Murray's thought. -- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file35413/bytes_parser_dont_close_file.patch ___ Python tracker rep...@bugs.python.org

[issue21608] logging.handlers.HTTPHandler.setFormatter() has no effect

2014-05-30 Thread Vinay Sajip
Vinay Sajip added the comment: As far as POLA is concerned, IMO serializing to the HTTP request format isn't really a text formatting operation in the same way as for most other handlers. The point is, even if you could have a Formatter handle the operation, you can't usefully share this

[issue20383] Add a keyword-only spec argument to types.ModuleType

2014-05-30 Thread Brett Cannon
Brett Cannon added the comment: And another complication is the compatibility hack to set loader when submodule_search_locations is set but loader is not since _NamespaceLoader is not exposed in C without importlib which gets us back into the whole question of whether types should function

[issue13212] json library is decoding/encoding when it should not

2014-05-30 Thread Chris Rebert
Chris Rebert added the comment: Okay, so can this issue be closed in light of the existing docs and issue 21514 then? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13212 ___

[issue20383] Add a keyword-only spec argument to types.ModuleType

2014-05-30 Thread Eric Snow
Eric Snow added the comment: But that part is less of a concern since we don't need namespace packages before or during bootstrapping, and afterward we have access to interp-importlib. Or am I missing something? which gets us back into the whole question of whether types should function

[issue21462] PEP 466: upgrade OpenSSL in the Python 2.7 Windows builds

2014-05-30 Thread Zachary Ware
Zachary Ware added the comment: Go ahead and commit; it will be up to Benjamin to cherry-pick it to his release branch (or to ask you to do it). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21462

[issue21561] help() on enum34 enumeration class creates only a dummy documentation

2014-05-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Devise a simple test (fail before, work after) that does not require enum34. If this fix is committed, the message could note that the same issue was fixed differently in 3.4 mixed in with other changes. -- nosy: +terry.reedy stage: - test needed

[issue21568] Win32 pip doesn't use relative path to found site-packages.

2014-05-30 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21568 ___ ___ Python-bugs-list

[issue21569] PEP 466: Python 2.7 What's New preamble changes

2014-05-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Did you intend to upload a diff with the current changes? My answers: * Just describe 466. Don't invite trouble. * Move the section to its logical place in temporal order, with a clear link. -- nosy: +terry.reedy

[issue21476] Inconsitent behaviour between BytesParser.parse and Parser.parse

2014-05-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Use try/finally to detach even if an exception is raised during parsing. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21476

[issue21462] PEP 466: upgrade OpenSSL in the Python 2.7 Windows builds

2014-05-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset f6e47d27f67a by Steve Dower in branch '2.7': Issue #21462 PEP 466: upgrade OpenSSL in the Python 2.7 Windows builds http://hg.python.org/cpython/rev/f6e47d27f67a -- nosy: +python-dev ___ Python tracker

[issue21608] logging.handlers.HTTPHandler.setFormatter() has no effect

2014-05-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset e5373bfbe76b by Vinay Sajip in branch '2.7': Issue #21608: Updated HTTPHandler documentation. http://hg.python.org/cpython/rev/e5373bfbe76b New changeset 220bed23696e by Vinay Sajip in branch '3.4': Issue #21608: Updated HTTPHandler documentation.

[issue14097] Improve the introduction page of the tutorial

2014-05-30 Thread Zachary Ware
Zachary Ware added the comment: How's this for a 2.7 backport? The least direct part of the backport is the section on division; I pretty much had to completely rewrite the paragraph in 2.x terms and I'm not certain that I took the best approach. -- stage: commit review - patch

[issue21573] Clean up turtle.py code formatting

2014-05-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am glad to see this. Gregor has been inactive for several years, Except for Ned's recent patch for OSX, it has been years since there was a turtle-specific code patch (from hg revision history). Questions: is there project link? are any of the mentors core

[issue20383] Add a keyword-only spec argument to types.ModuleType

2014-05-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset b26d021081d2 by Brett Cannon in branch 'default': Issue #20383: Introduce importlib.util.module_from_spec(). http://hg.python.org/cpython/rev/b26d021081d2 -- nosy: +python-dev ___ Python tracker

[issue20383] Add a keyword-only spec argument to types.ModuleType

2014-05-30 Thread Brett Cannon
Brett Cannon added the comment: After all the various revelations today about how much of a hassle and murky it would be to get types.ModuleType to do what we were after, I went ahead and kept importlib.util.module_from_spec(), but dropped the module argument bit. I also deconstructed

[issue21577] Help for ImportError should show a more useful signature.

2014-05-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Your example in #21578 suggests that **kwargs should be deleted. *args is right. ImportError(3, 'a') ImportError(3, 'a') Should not this be fixed by ArgClinic conversion, and is not there an issue for that for exceptions? -- nosy: +terry.reedy

[issue21500] Make use of the load_tests protocol in test_importlib packages

2014-05-30 Thread R. David Murray
R. David Murray added the comment: Personally I think the fact that this doesn't work by default is a bug in unittest. See issue 15007. Issue 16662 may also be related. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org

[issue21582] use support.captured_stdx context managers - test_asyncore

2014-05-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Since asyncore is depracated, I don't know if tests are being updated, or if this should be closed. -- nosy: +josiahcarlson, stutzbach, terry.reedy title: use support.catpured context managers - test_asyncore - use support.captured_stdx context

[issue21504] can the subprocess module war using os.wait4 and so return usage?

2014-05-30 Thread R. David Murray
R. David Murray added the comment: I think the answer is that if you want that level of control you can't use communicate, you have to implement what you specifically need. I'm going to close this as rejected. It could be reopened if someone can find a way to propose something that makes

[issue21583] use support.captured_stderr context manager - test_logging

2014-05-30 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +vinay.sajip stage: - patch review title: use support.catpured_stderr context manager - test_logging - use support.captured_stderr context manager - test_logging type: - enhancement ___ Python

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-05-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: The exception appears to be intentional, though I do not know what a 'qualified' exec would be. But since the tuple form is intended to mimic 3.x exec, and since a reduced version of your example c = ''' def g(): def f(): if True:

[issue20383] Add a keyword-only spec argument to types.ModuleType

2014-05-30 Thread Eric Snow
Eric Snow added the comment: Thanks for doing that Brett and for accommodating me. :) Also, the various little cleanups are much appreciated. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20383

[issue21592] Make statistics.median run in linear time

2014-05-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: To accept contributions, we need a signed (possibly electronically) contribution form. https://www.python.org/psf/contrib/contrib-form/ -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org

  1   2   >