[issue29988] (async) with blocks and try/finally are not as KeyboardInterrupt-safe as one might like

2017-04-04 Thread Nick Coghlan
Nick Coghlan added the comment: My first thought would be to inject a wordcode instruction that's essentially an eval loop directive: "ATOMIC_UNTIL " ATOMIC_UNTIL would have at least the following properties: - checks for signals are skipped until the given offset is reached - checks to

[issue16510] Using appropriate checks in tests

2017-04-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> rejected stage: patch review -> resolved status: open -> closed Added file: http://bugs.python.org/file46779/tests_asserts_7.patch ___ Python tracker

[issue20547] Use specific asserts in bigmem tests

2017-04-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> rejected stage: patch review -> resolved status: open -> closed Added file: http://bugs.python.org/file46778/test_bigmem_asserts_3.patch ___ Python tracker

Re: using HTTPHandler cause Django server side shows http 400 and Invalid HTTP_HOST header message

2017-04-04 Thread Steven D'Aprano
On Tue, 04 Apr 2017 21:06:23 -0700, iMath wrote: > For those want to help, I also posted The question here > http://stackoverflow.com/questions/43185804/using-httphandler-cause- django-server-side-shows-http-400-and-invalid-http-host > > > I am using HTTPHandler to send logging messages to a

[issue20545] Use specific asserts in unicode tests

2017-04-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> rejected stage: patch review -> resolved status: open -> closed Added file: http://bugs.python.org/file46777/test_unicode_asserts_3.patch ___ Python tracker

[issue29987] inspect.isgeneratorfunction not working with partial functions

2017-04-04 Thread Thomas Antony
Thomas Antony added the comment: Is there any way to distinguish such callables from "normal" functions without actually calling them? -- ___ Python tracker

[issue29569] threading.Timer class: Continue periodical execution till action returns True

2017-04-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: Antoine, do you care to make the call on this one? -- assignee: -> pitrou nosy: +pitrou ___ Python tracker ___

[issue29549] Improve docstring for str.index

2017-04-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 43ba8861e0ad044efafa46a7cc04e12ac5df640e by Raymond Hettinger (Lisa Roach) in branch 'master': bpo-29549: Fixes docstring for str.index (#256) https://github.com/python/cpython/commit/43ba8861e0ad044efafa46a7cc04e12ac5df640e --

[issue29446] Improve tkinter 'import *' situation

2017-04-04 Thread Louie Lu
Changes by Louie Lu : -- nosy: +louielu ___ Python tracker ___ ___ Python-bugs-list mailing

[issue29981] Update Index for set, dict, and generator 'comprehensions'

2017-04-04 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +1170 ___ Python tracker ___ ___ Python-bugs-list

[issue29640] _PyThreadState_Init and fork race leads to inconsistent key list

2017-04-04 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +davin ___ Python tracker ___ ___

[issue29981] Update Index for set, dict, and generator 'comprehensions'

2017-04-04 Thread Louie Lu
Changes by Louie Lu : -- nosy: +louielu ___ Python tracker ___ ___ Python-bugs-list mailing

[issue24117] Wrong range checking in GB18030 decoder.

2017-04-04 Thread Ma Lin
Changes by Ma Lin : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue29990] Range checking in GB18030 decoder

2017-04-04 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker ___ ___ Python-bugs-list

[issue29990] Range checking in GB18030 decoder

2017-04-04 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +1168 ___ Python tracker ___

[issue29990] Range checking in GB18030 decoder

2017-04-04 Thread Ma Lin
New submission from Ma Lin: This issue is split from issue24117, that issue became a soup of small issues, so I'm going to close it. For 4-byte GB18030 sequence, the legal range is: 0x81-0xFE for the 1st byte 0x30-0x39 for the 2nd byte 0x81-0xFE for the 3rd byte 0x30-0x39 for the 4th byte

Re: Does automatic golden master unittest generation exist/or is it feasible?

2017-04-04 Thread Steven D'Aprano
On Tue, 04 Apr 2017 19:40:03 -0700, fleshw wrote: > People told me that there's a similar concept called "Golden Master > Testing" where it keeps a "golden record" and runs test case on it. So > it looks like I'm trying to automate golden master testing. > > So my question is this: > > 1. Is

Does automatic golden master unittest generation exist/or is it feasible?

2017-04-04 Thread fleshw
I have a really large and mature codebase in py2, but with no test or documentation. To resolve this I just had a simple idea to automatically generate tests and this is how: 1. Have a decorator that logs all arguments and return values 2. Put them in a test case and have it run in

[issue13290] get vars for object with __slots__

2017-04-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think this API expansion should not be done. As a teacher of Python, I find that vars(o) is easily understood as a short-cut for o.__dict__ in much the same way as len(o) is a short-cut for o.__len__(). The proposed change makes this tool harder to

[issue29989] subprocess.Popen does not handle file-like objects without file descriptors

2017-04-04 Thread Raphael Gaschignard
New submission from Raphael Gaschignard: >From the documentation of the io module: fileno() Return the underlying file descriptor (an integer) of the stream if it exists. An OSError is raised if the IO object does not use a file descriptor. However, when passing a file-like object without a

[issue29987] inspect.isgeneratorfunction not working with partial functions

2017-04-04 Thread Martin Panter
Martin Panter added the comment: Doesn't seem like a bug to me. Even if there was special support for "partial" objects, that won't help with other ways of producing the same sort of thing. test2 = functools.partial(test, a=10) @functools.wraps(test) def test2(): return test(a=10) Both

[issue29986] Documentation recommends raising TypeError from tp_richcompare

2017-04-04 Thread Devin Jeanpierre
Devin Jeanpierre added the comment: Yeah, I agree there might be a use-case (can't find one offhand, but in principle), but I think it's rare enough that you're more likely to be led astray from reading this note -- almost always, NotImplemented does what you want. In a way this is a special

[issue29988] (async) with blocks and try/finally are not as KeyboardInterrupt-safe as one might like

2017-04-04 Thread Nathaniel Smith
New submission from Nathaniel Smith: You might hope the interpreter would enforce the invariant that for 'with' and 'async with' blocks, either '__(a)enter__' and '__(a)exit__' are both called, or else neither of them is called. But it turns out that this is not true once KeyboardInterrupt

[issue29987] inspect.isgeneratorfunction not working with partial functions

2017-04-04 Thread Thomas Antony
Changes by Thomas Antony : -- versions: +Python 3.6 ___ Python tracker ___ ___

[issue29987] inspect.isgeneratorfunction not working with partial functions

2017-04-04 Thread Thomas Antony
New submission from Thomas Antony: When inspect.isgeneratorfunction is called on the output of functools.partial, it returns False even if the original function was a generator function. Test case is attached. Tested in fresh conda environment running Python 3.6.1 -- files:

[issue29986] Documentation recommends raising TypeError from tp_richcompare

2017-04-04 Thread R. David Murray
R. David Murray added the comment: The documentation is technically correct, as far as I can see. Issue 8743 is not about disallowing certain comparison operations, but rather incorrectly implementing the earlier sentence in that same doc section: "If the comparison is undefined, it must

RE: Two variable dictionary comprehension

2017-04-04 Thread Deborah Swanson
Rob Gaddi wrote, on Tuesday, April 04, 2017 3:56 PM > > On 04/04/2017 03:34 PM, Deborah Swanson wrote: > > Terry Reedy wrote, on Tuesday, April 04, 2017 11:04 AM > >> > >> I am sure that this is because list comprehensions were once thr only > >> comprehensions and that the index was not updated

Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-04 Thread Mikhail V
On 3 April 2017 at 19:55, Steve D'Aprano wrote: > I didn't see you calling out Rick for his prejudice against those who aren't > American, his absurd belief that "most" people are satisfied with ASCII, Hmm... that is interesting. Everyone has some beliefs... If I

RE: Two variable dictionary comprehension

2017-04-04 Thread Deborah Swanson
Sorry I bailed on you last night, but you know it's bad when you can't read anymore. I read through this today and saw several things I really need to work with more, especially dicts, sets, generators and the zip function. I've used all of them in fairly typical forms, but it's the atypical ones

Re: Two variable dictionary comprehension

2017-04-04 Thread Rob Gaddi
On 04/04/2017 03:34 PM, Deborah Swanson wrote: Terry Reedy wrote, on Tuesday, April 04, 2017 11:04 AM On 4/3/2017 2:35 AM, Gregory Ewing wrote: Deborah Swanson wrote: Oh, come on. That's a fairly obscure citation in the docs, one that would take a good deal of experience and time reading

[issue29986] Documentation recommends raising TypeError from tp_richcompare

2017-04-04 Thread Devin Jeanpierre
Devin Jeanpierre added the comment: Sorry, forgot to link to docs because I was copy-pasting from the PR: https://docs.python.org/2/c-api/typeobj.html#c.PyTypeObject.tp_richcompare https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_richcompare > Note: If you want to implement a

[issue29986] Documentation recommends raising TypeError from tp_richcompare

2017-04-04 Thread Devin Jeanpierre
New submission from Devin Jeanpierre: am not sure when TypeError is the right choice. Definitely, most of the time I've seen it done, it causes trouble, and NotImplemented usually does something better. For example, see the work in https://bugs.python.org/issue8743 to get set to interoperate

[issue29947] In SocketServer, why not passing a factory instance for the RequestHandlerClass instead of the class itself?

2017-04-04 Thread Dominic Mayers
Changes by Dominic Mayers : Added file: http://bugs.python.org/file46775/Issue29947_for_discussion_03.patch ___ Python tracker ___

[issue29947] In SocketServer, why not passing a factory instance for the RequestHandlerClass instead of the class itself?

2017-04-04 Thread Dominic Mayers
Changes by Dominic Mayers : Removed file: http://bugs.python.org/file46774/Issue29947_for_discussion_02.patch ___ Python tracker ___

RE: Two variable dictionary comprehension

2017-04-04 Thread Deborah Swanson
Terry Reedy wrote, on Tuesday, April 04, 2017 11:04 AM > > On 4/3/2017 2:35 AM, Gregory Ewing wrote: > > Deborah Swanson wrote: > > > >> Oh, come on. That's a fairly obscure citation in the docs, > one that > >> would take a good deal of experience and time reading > through them to > >> know

[issue29985] make install doesn't seem to support --quiet

2017-04-04 Thread Chris Jerdonek
New submission from Chris Jerdonek: When installing from source, the --quiet option works with "configure" and a bare "make": $ ./configure --quiet $ make --quiet However, it doesn't seem to work when passed to "make install" (and "make altinstall", etc). I tried a number of

[issue29947] In SocketServer, why not passing a factory instance for the RequestHandlerClass instead of the class itself?

2017-04-04 Thread Dominic Mayers
Changes by Dominic Mayers : Removed file: http://bugs.python.org/file46770/Issue29947_for_discussion.patch ___ Python tracker ___

[issue29947] In SocketServer, why not passing a factory instance for the RequestHandlerClass instead of the class itself?

2017-04-04 Thread Dominic Mayers
Dominic Mayers added the comment: I simplified the patch. Using a class as a factory function is the simplest case, so I took advantage of this. I also give one way to pass extra parameters to the handler in the factory function, because it's the main reason why we cannot always use a class.

[issue7659] Attribute assignment on object() instances raises wrong exception

2017-04-04 Thread R. David Murray
R. David Murray added the comment: Agreed. Time to close this. -- resolution: -> not a bug stage: needs patch -> resolved status: open -> closed ___ Python tracker

Re: Appending data to a json file

2017-04-04 Thread MRAB
On 2017-04-04 21:00, Dennis Lee Bieber wrote: On Tue, 4 Apr 2017 13:23:52 -0400, Dave declaimed the following: I don't care for the idea of replacing the data file for every save. My preference would to append to the existing data file - makes more sense. However, that

[issue29905] TypeErrors not formatting values correctly

2017-04-04 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- pull_requests: +1166 ___ Python tracker ___

[issue29977] re.sub stalls forever on an unmatched non-greedy case

2017-04-04 Thread Matthew Barnett
Matthew Barnett added the comment: A slightly shorter form: /\*(?:(?!\*/).)*\*/ Basically it's: match start while not match end: consume character match end If the "match end" is a single character, you can use a negated character set, for example: [^\n]*

[issue29966] typing.get_type_hints doesn't really work for classes with ForwardRefs

2017-04-04 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: You could try: glob = globals.copy() glob.update(a.__dict__) glob.update(b.__dict__) You can do this automatically following MyClass.__mro__ and then collecting relevant __module__ attributes on bases. However, there is little chance this will be fixed in

[issue29982] tempfile.TemporaryDirectory fails to delete itself

2017-04-04 Thread Eryk Sun
Changes by Eryk Sun : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware versions: +Python 3.7 ___ Python tracker

[issue7659] Attribute assignment on object() instances raises wrong exception

2017-04-04 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: I don't think a change is actually needed here (bumping to decide the fate of this issue) -- nosy: +Jim Fasarakis-Hilliard ___ Python tracker

[issue28087] macOS 12 poll syscall returns prematurely

2017-04-04 Thread Ennis Massey
Ennis Massey added the comment: Makes sense it would also fail. They both use the same syscall. Gud job on the backport Sent from my iPhone > On 4/04/2017, at 4:50 AM, STINNER Victor wrote: > > > STINNER Victor added the comment: > > Ah! Python 2.7 tests succeeded

[issue29860] smtplib.py doesn't capitalize EHLO.

2017-04-04 Thread Maciej Szulik
Changes by Maciej Szulik : -- nosy: +maciej.szulik ___ Python tracker ___ ___

[issue29984] Improve test coverage for 'heapq' module

2017-04-04 Thread Robert Day
Changes by Robert Day : -- pull_requests: +1165 ___ Python tracker ___ ___

[issue29984] Improve test coverage for 'heapq' module

2017-04-04 Thread Robert Day
New submission from Robert Day: It's currently at 97%: Name Stmts Miss Cover Missing Lib/heapq.py 262 797% 187, 351-352, 375-376, 606-607 I'm submitting a Github PR to fix it. -- components: Tests messages:

[ANNOUNCE] Mail Drake version 0.1.7

2017-04-04 Thread Ben Finney
Howdy all, I am pleased to present Mail Drake (version 0.1.7), now available at PyPI . Mail Drake is a development tool for testing email traffic. Run Mail Drake’s SMTP server on a local port, send email to it, and inspect the message queue in a local

[issue29970] Severe open file leakage running asyncio SSL server

2017-04-04 Thread Yury Selivanov
Yury Selivanov added the comment: I'm assigning this to myself to make sure I don't forget about this. If someone wants to tackle this please feel free to reassign. -- assignee: -> yselivanov versions: +Python 3.7 ___ Python tracker

[issue29970] Severe open file leakage running asyncio SSL server

2017-04-04 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +giampaolo.rodola, haypo ___ Python tracker ___ ___

[issue28681] About function renaming in the tutorial

2017-04-04 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- nosy: +Jim Fasarakis-Hilliard ___ Python tracker ___

[issue29905] TypeErrors not formatting values correctly

2017-04-04 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: As per #issue25002 and, specifically #msg250151, the TypeError in `asynchat` should probably not be included, I'll just make a PR for the TypeError in asyncio/proactor_events -- ___ Python tracker

Re: Two variable dictionary comprehension

2017-04-04 Thread Terry Reedy
On 4/3/2017 6:09 PM, Deborah Swanson wrote: Nathan Ernst wrote, on April 03, 2017 1:59 PM I was a bit surprised when I looked at the language reference for 3.6.x. I expected there'd be a direct link to comprehensions, but there's not. ... FWIW, If one was completely new to Python, even

[issue13290] get vars for object with __slots__

2017-04-04 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- nosy: +Jim Fasarakis-Hilliard ___ Python tracker ___

[issue29983] Reference TOC: expand 'Atoms' and 'Primaries'

2017-04-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: 'displays' is partly redundant with 'comprehensions'. Since many think of other 'displays' as a type of literal, leave 'displays' out. They are well indexed. I think the most likely term people have trouble finding in the TOC is 'comprehension'. It was

[issue29983] Reference TOC: expand 'Atoms' and 'Primaries'

2017-04-04 Thread Terry J. Reedy
New submission from Terry J. Reedy: Today there is a fairly long python-list thread about the difficult of finding info on 'dict comprehensions' in the doc. Point 1 is missing index entries. I opened #29981 for this. Point 2 is something I have also noticed: the obscurity of 'Atoms' and

Re: Appending data to a json file

2017-04-04 Thread Grant Edwards
On 2017-04-04, Ben Finney wrote: > Dave writes: > >> I don't care for the idea of replacing the data file for every save. > > This is the simplest implementation. It works. Can you say why you don't > care for it? After the data is read, it

[issue29981] Update Index for set, dict, and generator 'comprehensions'

2017-04-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: See #29983 for expanding the title of the 'atoms' section containing subsections on comprehensions. -- title: Update Index set, dict, and generator 'comprehensions' -> Update Index for set, dict, and generator 'comprehensions'

[issue29982] tempfile.TemporaryDirectory fails to delete itself

2017-04-04 Thread Max
New submission from Max: There's a known issue with `shutil.rmtree` on Windows, in that it fails intermittently. The issue is well known (https://mail.python.org/pipermail/python-dev/2013-September/128353.html), and the agreement is that it cannot be cleanly solved inside `shutil` and

ANN: Wing Python IDE version 6.0.4 released

2017-04-04 Thread Wingware
Hi, We've just released Wing 6.0.4 which fixes remote development to systems with Python 3, addresses problems seen when switching between remote projects and when remote host configurations are missing or invalid, fixes text drag-and-drop, solves problems with analysis of some type

Re: Appending data to a json file

2017-04-04 Thread Michael Torrie
On 04/04/2017 11:23 AM, Dave wrote: > I did. Please see the subject - it is json, not some bastardized > version of it. My fault for not seeing that! Sorry about the noise. -- https://mail.python.org/mailman/listinfo/python-list

Re: Appending data to a json file

2017-04-04 Thread Dave
On 04/04/2017 01:50 PM, Rob Gaddi wrote: On 04/04/2017 10:23 AM, Dave wrote: I don't care for the idea of replacing the data file for every save. My preference would to append to the existing data file - makes more sense. However, that is not how json works. So, I'm considering other

Re: Two variable dictionary comprehension

2017-04-04 Thread Terry Reedy
On 4/3/2017 2:35 AM, Gregory Ewing wrote: Deborah Swanson wrote: Oh, come on. That's a fairly obscure citation in the docs, one that would take a good deal of experience and time reading through them to know was there, Having said that, the index of the Python docs could be improved a bit

[issue29981] Update Index set, dict, and generator 'comprehensions'

2017-04-04 Thread Terry J. Reedy
New submission from Terry J. Reedy: The index currently has comprehensions *list* with *list* linked to 6.2.5 List displays. I suggest: 1. Link *comprehensions* to 6.2.4. Displays for lists, sets and dictionaries 2. Add subentries *set*, *dict*, and *generator* linked to 2a. 6.2.6. Set

Re: Data exchange between python script and bash script

2017-04-04 Thread justin walters
On Tue, Apr 4, 2017 at 10:39 AM, Venkatachalam Srinivasan < venkatachalam...@gmail.com> wrote: > Hi, > > Thanks for the answer. I need bash for connecting data exchange between > two python scripts. To be more specific, data from one script has to be > passed to the another script. You are right,

Re: Data exchange between python script and bash script

2017-04-04 Thread Rhodri James
On 04/04/17 18:07, Venkatachalam Srinivasan wrote: On Tuesday, April 4, 2017 at 5:27:42 PM UTC+2, cassiope wrote: On Tue, 04 Apr 2017 08:01:42 -0700, venkatachalam.19 wrote: Hello All, I am writing a python code for processing a data obtained from a sensor. The data from sensor is obtained

Re: Appending data to a json file

2017-04-04 Thread Rob Gaddi
On 04/04/2017 10:23 AM, Dave wrote: I don't care for the idea of replacing the data file for every save. My preference would to append to the existing data file - makes more sense. However, that is not how json works. So, I'm considering other alternatives for a data file structure. Paired

[issue29968] Document that no characters are allowed to proceed \ in explicit line joining

2017-04-04 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Gotcha, thanks for the input, David. I'll leave it to you to decide if the sentence on the trailing comments warrants removal. -- resolution: -> rejected stage: -> resolved status: open -> closed ___

Re: Data exchange between python script and bash script

2017-04-04 Thread Venkatachalam Srinivasan
On Tuesday, April 4, 2017 at 5:42:23 PM UTC+2, justin walters wrote: > On Tue, Apr 4, 2017 at 8:01 AM, wrote: > > > Hello All, > > > > I am writing a python code for processing a data obtained from a sensor. > > The data from sensor is obtained by executing a python

Re: Appending data to a json file

2017-04-04 Thread Ben Finney
Dave writes: > I don't care for the idea of replacing the data file for every save. This is the simplest implementation. It works. Can you say why you don't care for it? > My preference would to append to the existing data file - makes more > sense. Can you expand on

Re: Appending data to a json file

2017-04-04 Thread Dave
On 04/04/2017 10:17 AM, Michael Torrie wrote: On 04/03/2017 11:31 PM, dieter wrote: Dave writes: I created a python program that gets data from a user, stores the data as a dictionary in a list of dictionaries. When the program quits, it saves the data file. My desire

[issue29980] OSError: multiple exceptions should preserve the exception type if it is common

2017-04-04 Thread R. David Murray
R. David Murray added the comment: If all connections fail (not file :) -- ___ Python tracker ___ ___

[issue29980] OSError: multiple exceptions should preserve the exception type if it is common

2017-04-04 Thread R. David Murray
New submission from R. David Murray: create_connection will try multiple times to connect if there are multiple addresses returned by getaddrinfo. If all connections file it inspects the exceptions, and raises the first one if they are all equal. But since the addresses are often different

Re: Data exchange between python script and bash script

2017-04-04 Thread Venkatachalam Srinivasan
On Tuesday, April 4, 2017 at 5:27:42 PM UTC+2, cassiope wrote: > On Tue, 04 Apr 2017 08:01:42 -0700, venkatachalam.19 wrote: > > > Hello All, > > > > I am writing a python code for processing a data obtained from a sensor. > > The data from sensor is obtained by executing a python script. The

Optimize this code further

2017-04-04 Thread Ganesh Pal
Dear friends. I am trying optimize the below sample code any suggestion on this please let me know yy-1# cat file1.py #! /usr/bin/python from __future__ import absolute_import, division, print_function import os import sys import logging logging.basicConfig(stream=sys.stderr,

[issue29851] Have importlib.reload() raise ModuleNotFoundError when a spec can't be found

2017-04-04 Thread Brett Cannon
Brett Cannon added the comment: That's a good point, Serhiy, since that's what the exception is signaling. So yes, the exception should be ModuleNotFounderror. -- title: Have importlib.reload() raise ImportError when a spec can't be found -> Have importlib.reload() raise

Re: Appending data to a json file

2017-04-04 Thread Robin Koch
Am 04.04.2017 um 04:59 schrieb Dave: I created a python program that gets data from a user, stores the data as a dictionary in a list of dictionaries. When the program quits, it saves the data file. My desire is to append the new data to the existing data file as is done with purely text

Re: Basic Nested Dictionary in a Loop

2017-04-04 Thread Ganesh Pal
Thanks Peter , Terry and others ! On Tue, Apr 4, 2017 at 12:11 PM, Peter Otten <__pete...@web.de> wrote: > Ganesh Pal wrote: > > >> > >> > >> Whenever you feel the urge to write range(len(whatever)) -- resist that > >> temptation, and you'll end up with better Python code ;) > >> > >> > > Thanks

Re: Data exchange between python script and bash script

2017-04-04 Thread justin walters
On Tue, Apr 4, 2017 at 8:01 AM, wrote: > Hello All, > > I am writing a python code for processing a data obtained from a sensor. > The data from sensor is obtained by executing a python script. The data > obtained should be further given to another python module where

Re: Data exchange between python script and bash script

2017-04-04 Thread Frank Miles
On Tue, 04 Apr 2017 08:01:42 -0700, venkatachalam.19 wrote: > Hello All, > > I am writing a python code for processing a data obtained from a sensor. The > data from sensor is obtained by executing a python script. The data obtained > should be further given to another python module where the

[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2017-04-04 Thread Nick Coghlan
Nick Coghlan added the comment: Reviewing the discussion, I assume this was left open to cover reordering the __aenter__ and __aexit__ checks for async with, but that can just as easily be handled as a separate issue (which would also be clearer at the NEWS level). -- stage: patch

Data exchange between python script and bash script

2017-04-04 Thread venkatachalam . 19
Hello All, I am writing a python code for processing a data obtained from a sensor. The data from sensor is obtained by executing a python script. The data obtained should be further given to another python module where the received data is used for adjusting the location of an object. For

Data transmission from Python script to bash script

2017-04-04 Thread venkatachalam . 19
Hello All, I am writing a python code for processing a data obtained from a sensor. The data from sensor is obtained by executing a python script. The data obtained should be further given to another python module where the received data is used for adjusting the location of an object. For

Re: Appending data to a json file

2017-04-04 Thread Michael Torrie
On 04/04/2017 08:19 AM, Jussi Piitulainen wrote: > The clue is on the subject line. Ahh, so it is. -- https://mail.python.org/mailman/listinfo/python-list

[issue29968] Document that no characters are allowed to proceed \ in explicit line joining

2017-04-04 Thread R. David Murray
R. David Murray added the comment: I don't see any omission, myself. Keep in mind that the language reference is as much or more of a specification as it is a reference, so we tend to try to use the minimum language that precisely describes the expected behavior. Which is why I suggested

Re: Appending data to a json file

2017-04-04 Thread Jussi Piitulainen
Michael Torrie writes: > On 04/03/2017 11:31 PM, dieter wrote: >> Dave writes: >> >>> I created a python program that gets data from a user, stores the data >>> as a dictionary in a list of dictionaries. When the program quits, it >>> saves the data file. My desire is to

Re: Appending data to a json file

2017-04-04 Thread Michael Torrie
On 04/03/2017 11:31 PM, dieter wrote: > Dave writes: > >> I created a python program that gets data from a user, stores the data >> as a dictionary in a list of dictionaries. When the program quits, it >> saves the data file. My desire is to append the new data to the >>

Re: Text-mode apps (Was :Who are the "spacists"?)

2017-04-04 Thread cwrseckford
On Saturday, 1 April 2017 17:01:03 UTC+1, Steve D'Aprano wrote: > On Sat, 1 Apr 2017 12:17 pm, Rick Johnson wrote: > > > Most people just quietly change the filename and move on > > > There are over a billion people in China, almost a billion more in India, > about 140 million people in

[issue29979] cgi.parse_multipart is not consistent with FieldStorage

2017-04-04 Thread Pierre Quentel
Changes by Pierre Quentel : -- pull_requests: +1163 ___ Python tracker ___ ___

[issue29979] cgi.parse_multipart is not consistent with FieldStorage

2017-04-04 Thread Senthil Kumaran
Senthil Kumaran added the comment: Looking forward to this. -- assignee: -> orsenthil nosy: +orsenthil ___ Python tracker ___

Re: Improve Python + Influxdb import performance

2017-04-04 Thread Prathamesh
Hi Inada Thank you for your response Weblogic works on Jython 2.2.1 and I think the Python requests module requires >= python 2.6 Please correct me if I'm wrong or if there is another way to get this to work Thanks P On Monday, April 3, 2017 at 9:52:38 PM UTC+5:30, INADA Naoki wrote: > You can

[issue29979] cgi.parse_multipart is not consistent with FieldStorage

2017-04-04 Thread Pierre Quentel
Changes by Pierre Quentel : -- pull_requests: +1162 ___ Python tracker ___ ___

[issue29978] Remove remove merge=union attribute for Misc/NEWS in 3.6 and 2.7

2017-04-04 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue29974] Change typing.TYPE_CHECKING doc example

2017-04-04 Thread Mathias Rav
Mathias Rav added the comment: I have updated the patch after feedback from Jelle Zijlstra and Ivan Levkevskyi. Indeed the example was correct; the patch now adds wording from PEP 484 and PEP 526 to clarify why a function parameter annotation needs to be in quotes and a local variable

[issue29974] Change typing.TYPE_CHECKING doc example

2017-04-04 Thread Mathias Rav
Changes by Mathias Rav : -- title: typing.TYPE_CHECKING doc example is incorrect -> Change typing.TYPE_CHECKING doc example ___ Python tracker

[issue29649] struct.pack_into check boundary error message ignores offset

2017-04-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Andrew. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29649] struct.pack_into check boundary error message ignores offset

2017-04-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f78b119364b521307237a1484ba5f43f42300898 by Serhiy Storchaka (Andrew Nester) in branch 'master': bpo-29649: Improve struct.pack_into() boundary error messages (#424)

[issue29978] Remove remove merge=union attribute for Misc/NEWS in 3.6 and 2.7

2017-04-04 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +1160 ___ Python tracker ___ ___

  1   2   >