Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-19 Thread Larry Hudson via Python-list
On 02/19/2016 10:14 AM, wrong.addres...@gmail.com wrote: [snip] This is precisely reading one character at a time. If not exactly reading one character, it is effectively looking at each character to assemble the number. Not a good sign. I guess there might be libraries which will help read

Re: How the heck does async/await work in Python 3.5

2016-02-19 Thread Ian Kelly
On Fri, Feb 19, 2016 at 10:24 PM, Rustom Mody wrote: > Less snarkily looks like a series of bolt-ons after bolt-ons > > IMHO Guido's (otherwise) uncannily sound intuitions have been wrong right from > 2001 when he overloaded def for generators. > And after that its been

[newbie] Problem with matplotlib

2016-02-19 Thread jenswaelkens
When I use either of the following commands I get an error for which I don't have a solution, could someone here help me further? These are the commands: import matplotlib.pyplot as plt or from matplotlib.pyplot import pyplot as plt This is the error I get: Traceback (most recent call last):

Re: asyncio - run coroutine in the background

2016-02-19 Thread Paul Rubin
Marko Rauhamaa writes: > "Frank Millman" : >> I would love to drive the database asynchronously, but of the three >> databases I use, only psycopg2 seems to have asyncio support. > Yes, asyncio is at its infancy. There needs to be a moratorium on > blocking

[issue26261] NamedTemporaryFile documentation is vague about the `name` attribute

2016-02-19 Thread Martin Panter
Martin Panter added the comment: Here is my proposed patch. -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file41977/tempfile-name.patch ___ Python tracker

Trac 1.0.10 released

2016-02-19 Thread Ryan Ollos
Trac 1.0.10 Released === Trac 1.0.10, the latest maintenance release for the current stable branch, is available. You will find this release at the usual places: http://trac.edgewall.org/wiki/TracDownload#LatestStableRelease https://pypi.python.org/pypi/Trac/1.0.10 Trac

Re: How the heck does async/await work in Python 3.5

2016-02-19 Thread Christian Gollwitzer
Am 20.02.16 um 03:36 schrieb Steven D'Aprano: On Thu, 18 Feb 2016 09:08 am, Mark Lawrence wrote: Seeing there is a lot of interest in asyncio recently I figured people might be interested in this http://www.snarky.ca/how-the-heck-does-async-await-work-in-python-3-5 Thanks for the link, but

Re: How the heck does async/await work in Python 3.5

2016-02-19 Thread Paul Rubin
Rustom Mody writes: > Forgot the probably most important: Not merging stackless into CPython I thought there was some serious technical obstacle to that. Where can I find Greg Ewing's suggestions about Python coroutines? The async/await stuff seems ok on the surface. I

[issue4928] Problem with tempfile.NamedTemporaryFile

2016-02-19 Thread Martin Panter
Martin Panter added the comment: I am surprised at the report that Red Hat Linux automatically removed the file. What system calls are involved? On my Arch Linux setup with current 3.6 code it leaves the file behind (same as the Solaris report). However the the Windows version does

[issue13354] tcpserver should document non-threaded long-living connections

2016-02-19 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

Re: How the heck does async/await work in Python 3.5

2016-02-19 Thread Rustom Mody
On Saturday, February 20, 2016 at 10:55:02 AM UTC+5:30, Rustom Mody wrote: > On Saturday, February 20, 2016 at 8:07:03 AM UTC+5:30, Steven D'Aprano wrote: > > On Thu, 18 Feb 2016 09:08 am, Mark Lawrence wrote: > > > > > Seeing there is a lot of interest in asyncio recently I figured people > > >

Re: How the heck does async/await work in Python 3.5

2016-02-19 Thread Rustom Mody
On Saturday, February 20, 2016 at 8:07:03 AM UTC+5:30, Steven D'Aprano wrote: > On Thu, 18 Feb 2016 09:08 am, Mark Lawrence wrote: > > > Seeing there is a lot of interest in asyncio recently I figured people > > might be interested in this > >

[issue26389] Expand traceback module API to accept just an exception as an argument

2016-02-19 Thread Martin Panter
Martin Panter added the comment: There is precedent with Python 2’s “raise” statement for accepting an exception instance for the first parameter (where an exception class would otherwise be passed). Also, generator.throw() supports this; see Issue 14911 for clarifying its documentation. I

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-19 Thread Denis Akhiyarov
On Wednesday, February 17, 2016 at 1:49:44 PM UTC-6, wrong.a...@gmail.com wrote: > I am mostly getting positive feedback for Python. > > It seems Python is used more for web based applications. Is it equally fine > for creating stand-alone *.exe's? Can the same code be compiled to run on >

[issue13354] tcpserver should document non-threaded long-living connections

2016-02-19 Thread Martin Panter
Martin Panter added the comment: Thanks for the fast response! There is a paragraph right at the end of that mentions this technique: “. . . maintain an explicit table of partially finished requests . . .”. Perhaps

Re: [STORY-TIME] THE BDFL AND HIS PYTHON PETTING ZOO

2016-02-19 Thread Terry Reedy
On 2/18/2016 9:22 PM, Ethan Furman wrote: Anyone know one for deleting all responses to a troll post? Thunderbird has 'ignore thread' on its context menu. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

[issue26385] the call of tempfile.NamedTemporaryFile fails and leaves a file on the disk

2016-02-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: It makes it clearer that you know that it will 'everything' and intend to catch do so and that you did not casually toss in 'except:', as used to be the habit of many. There are over 20 bare excepts in idlelib and I suspect many or most are unintentionally

[issue26351] Occasionally check for Ctrl-C in long-running operations like sum

2016-02-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: I verified that ^Break(pause) works. It even causes ^C to be printed. -- ___ Python tracker ___

[issue26385] the call of tempfile.NamedTemporaryFile fails and leaves a file on the disk

2016-02-19 Thread Martin Panter
Martin Panter added the comment: Eryk Sun: The patch proposes to add an unlink() call after the file has been closed: except Exception: _os.close(fd) # This automatically deletes the file right? _os.unlink(name) # Won’t this raise FileNotFoundError? raise By your explanation, it

[issue26389] Expand traceback module API to accept just an exception as an argument

2016-02-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: You title and post don't seem to match. The title says to expand the API and the post says there is no reason to expand the API. Did you mean 'good reason'? Also, I think you meant 'grab the traceback' (from the exception) rather than 'grab the exception'.

[issue26386] tkinter - Treeview - .selection_add and selection_toggle

2016-02-19 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> test needed versions: +Python 2.7, Python 3.6 ___ Python tracker ___

[issue26386] tkinter - Treeview - .selection_add and selection_toggle

2016-02-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: The 3.5 version of 2015 Dec 6 is 3.5.1. A traceback is not a crash for the purpose of this tracker. It is generally a good idea to mention OS, OS version, and Tk Version. (IDLE displays TkVersion in Help => About IDLE.) However, on Win 10 (8.6.4), I was

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-19 Thread William Ray Wing
> On Feb 19, 2016, at 8:13 PM, Steven D'Aprano wrote: > > On Sat, 20 Feb 2016 12:27 am, Dennis Lee Bieber wrote: > > >> Then the best suggestion I have would be to take a weekend and just >> read the language reference manual (it used to be about an 80-page PDF >> file,

[issue26380] Add an http method enum

2016-02-19 Thread Martin Panter
Martin Panter added the comment: The RFC for HTTP says the method is case-sensitive, although I have seen one person use lowercase (probably by accident). So “over the wire” it has to be uppercase b"GET". -- ___ Python tracker

[issue26385] the call of tempfile.NamedTemporaryFile fails and leaves a file on the disk

2016-02-19 Thread STINNER Victor
STINNER Victor added the comment: I prefer "except:" over "except BaseException:". What is the benefit of passing explicitly BaseException? -- ___ Python tracker

[issue26382] List object memory allocator

2016-02-19 Thread STINNER Victor
STINNER Victor added the comment: Terry J. Reedy added the comment: > My impression is that we do not do such performance enhancements to 2.7 for > the same reason we would not do them to current 3.x -- the risk of breakage. > Have I misunderstood? Breakage of what? The change looks very

[issue26385] the call of tempfile.NamedTemporaryFile fails and leaves a file on the disk

2016-02-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: `except:` is equivalent to `except BaseException:`. When I introduced the former into idlelib, a couple of years ago, I was told to do the latter in a follow-up patch, so that there would be no doubt as to the intent. The same should be done here.

Re: How the heck does async/await work in Python 3.5

2016-02-19 Thread Steven D'Aprano
On Thu, 18 Feb 2016 09:08 am, Mark Lawrence wrote: > Seeing there is a lot of interest in asyncio recently I figured people > might be interested in this > http://www.snarky.ca/how-the-heck-does-async-await-work-in-python-3-5 Thanks for the link, but I'm now no wiser than I was before :-( Can

Re: Guido on python3 for beginners

2016-02-19 Thread Steven D'Aprano
On Fri, 19 Feb 2016 02:39 pm, Rustom Mody wrote: > Consider as hypothesis > L1: Needs 4 weeks to master A language that only takes 4 weeks to master, starting from zero programming experience, clearly doesn't include much in the way of features. > L2: Needs 4 years to manage (if you want to

Re: How to properly override the default factory of defaultdict?

2016-02-19 Thread Chris Angelico
On Sat, Feb 20, 2016 at 11:24 AM, Ian Kelly wrote: >> Look like inheriting from defaultdict is easier. I don't even have to >> override the constructor as suggested by Chris Angelico above. Thanks. > > True, although there's a faint code smell as this technically violates

[issue26382] List object memory allocator

2016-02-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: My impression is that we do not do such performance enhancements to 2.7 for the same reason we would not do them to current 3.x -- the risk of breakage. Have I misunderstood? -- nosy: +terry.reedy ___ Python

[issue26380] Add an http method enum

2016-02-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: If I were deciding, I would be inclined to reject this. Part of the understanding when enums were added was that they would not automatically be used in the stdlib anywhere there could be used. To answer 'why not', there is an obvious gain to naming

[issue13354] tcpserver should document non-threaded long-living connections

2016-02-19 Thread Bas Wijnen
Bas Wijnen added the comment: For example, I have some programs which are HTTP servers that implement WebSockets. For regular web page requests, it is acceptable if the connection is closed after the page is sent. But for a WebSocket it isn't: the whole point of that protocol is to allow

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-19 Thread Steven D'Aprano
On Sat, 20 Feb 2016 12:27 am, Dennis Lee Bieber wrote: > Then the best suggestion I have would be to take a weekend and just > read the language reference manual (it used to be about an 80-page PDF > file, but has no doubt grown into some less handy dynamically linked > HTML/"help" file). Then

Re: downloading a CSV

2016-02-19 Thread Tim Chase
On 2016-02-19 10:46, noydb wrote: > I want to be able to download this CSV file and save to disk > >> http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.csv from urllib.request import urlopen data =

[issue26379] zlib decompress as_bytearray flag

2016-02-19 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +nadeem.vawda, twouters ___ Python tracker ___ ___

[issue26377] Tkinter dialogs will not close if root window not packed.

2016-02-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Try adding 'parent=rootWin' to the messagebox call. Otherwise, I expect that this is, as far as cause, a duplicate of #2637, in which case my comment https://bugs.python.org/issue26376#msg260544 applies. -- components: -IDLE nosy: +terry.reedy

[issue26376] Tkinter root window won't close if packed.

2016-02-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: No problem on Windows either, where the minimum window width is wide enough to acommodate all 3 frame buttons (- [] X). Please run your test.py directly, either in the terminal or however else one does so on OSX, without IDLE, to make absolutely sure that

[issue26375] Python 2.7.10 and 3.4.4 hang on imaplib.IMAP4_SSL()

2016-02-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: where was the 'RC4 cipher' removed from. Do you know the issue or commit that did so? -- keywords: +3.4regression nosy: +terry.reedy stage: -> test needed title: New versions of Python hangs on imaplib.IMAP4_SSL() -> Python 2.7.10 and 3.4.4 hang on

[issue26369] doc for unicode.decode and str.encode is unnecessarily confusing

2016-02-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: The intended use for str.encode is for same-type transcoding, like this: I was unaware of the seemingly useless behavior you quote. >>> 'abc'.encode('base64') 'YWJj\n' >>> 'YWJj\n'.decode('base64') 'abc' Here is a similar use for unicode.decode. >>>

[issue21996] gettarinfo method does not handle files without text string names

2016-02-19 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: +Python 3.6 -Python 3.4 ___ Python tracker

[issue22468] Tarfile using fstat on GZip file object

2016-02-19 Thread Martin Panter
Martin Panter added the comment: Hoping my clarification in the documentation is enough to call this fixed -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7, Python 3.6 -Python 3.4 ___ Python

Re: How to properly override the default factory of defaultdict?

2016-02-19 Thread Ian Kelly
On Thu, Feb 18, 2016 at 10:41 AM, Herman wrote: > From: Ben Finney >> >> you are using the inheritance hierarchy but thwarting it by not using >> ‘super’. Instead:: >> >> super().__init__(self, default_factory, *a, **kw) >> >> and:: >> >>

[issue21996] gettarinfo method does not handle files without text string names

2016-02-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 94a94deaf06a by Martin Panter in branch '3.5': Issues #22468, #21996, #22208: Clarify gettarinfo() and TarInfo usage https://hg.python.org/cpython/rev/94a94deaf06a New changeset 9d5217aaea13 by Martin Panter in branch '2.7': Issues #22468, #21996,

[issue22208] tarfile can't add in memory files (reopened)

2016-02-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 94a94deaf06a by Martin Panter in branch '3.5': Issues #22468, #21996, #22208: Clarify gettarinfo() and TarInfo usage https://hg.python.org/cpython/rev/94a94deaf06a New changeset 9d5217aaea13 by Martin Panter in branch '2.7': Issues #22468, #21996,

[issue26367] importlib.__import__ does not fail for invalid relative import

2016-02-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Manuel, welcome to the tracker and thank you for submitting patches. I agree that 5 lines is past the threshhold. Your profile has been CLA-updated, so we are good to go. -- nosy: +terry.reedy ___ Python tracker

[issue22468] Tarfile using fstat on GZip file object

2016-02-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 94a94deaf06a by Martin Panter in branch '3.5': Issues #22468, #21996, #22208: Clarify gettarinfo() and TarInfo usage https://hg.python.org/cpython/rev/94a94deaf06a New changeset e66c476b25ec by Martin Panter in branch 'default': Issue #22468: Merge

[issue26358] mmap.mmap.__iter__ is broken (yields bytes instead of ints)

2016-02-19 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +twouters versions: -Python 3.2, Python 3.3, Python 3.4 ___ Python tracker ___

[issue26351] Occasionally check for Ctrl-C in long-running operations like sum

2016-02-19 Thread STINNER Victor
STINNER Victor added the comment: > Great idea. In Windows, closing the window with [x] will kill the process, > at the cost of loosing its contents. Note: after a few years, I heard that Windows supports something like SIGKILL: CTRL+Pause kills the current process ;-) You loose the process,

[issue26351] Occasionally check for Ctrl-C in long-running operations like sum

2016-02-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Great idea. In Windows, closing the window with [x] will kill the process, at the cost of loosing its contents. In IDLE's Shell, Restart Shell will do the same without killing IDLE, but it is easy to not know of or forget that option in a moment of panic.

[issue26377] Tkinter dialogs will not close if root window not packed.

2016-02-19 Thread Sam Yeager
Changes by Sam Yeager : -- type: -> behavior ___ Python tracker ___ ___

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-19 Thread BartC
On 19/02/2016 18:14, wrong.addres...@gmail.com wrote: On Friday, 19 February 2016 16:08:46 UTC+2, Tim Chase wrote: All this I could do with one Read or Input statement in Fortran and Basic. I agree with you completely. This stuff is far more complicated than it need be. And the fact that

[issue13354] tcpserver should document non-threaded long-living connections

2016-02-19 Thread Martin Panter
Martin Panter added the comment: Bas: I think you need to provide more information. Are you talking about protocols like HTTP, where multiple high-level (HTTP-level) requests are made over a single low-level (socket-level) connection? Some example code might help. Overriding

[issue1429] FD leak in SocketServer when request handler throws exception

2016-02-19 Thread Martin Panter
Martin Panter added the comment: Jeff has tried many times over two years to produce the originally reported bug without success. By code inspection, I cannot see how a request handler exception could cause a leak. Therefore I am closing this as “works for me”. Working backwards from all the

[issue26392] socketserver.BaseServer.close_server should stop serve_forever

2016-02-19 Thread Martin Panter
Martin Panter added the comment: I thought the purpose of server_close() was to clean up resources after you have finished calling serve_forever() or handle_request(). Just like you call close() on a file after you have finished reading or writing it. If you try to read or write a closed

[issue5715] listen socket close in SocketServer.ForkingMixIn.process_request()

2016-02-19 Thread Martin Panter
Martin Panter added the comment: Replying to Donghyun’s last message, I understand UDPServer is derived from the TCPServer, so it would inherit TCPServer.server_close(), and therefore would close the one and only UDP socket. I think you may have to add a new prepare_child() method, or add a

Azure SDK v2.0.0a1 released

2016-02-19 Thread Laurent Mazuel
I am glad to announce the release of the Azure SDK for Python v2.0.0a1. This package is available on the Python package index at http://pypi.python.org/pypi/azure This version introduces the new Python code generator from Swagger files. This includes new services (e.g. CDN, Logic/Web Apps,

[issue25668] Deadlock in logging caused by a possible race condition with "format"

2016-02-19 Thread Vinay Sajip
Vinay Sajip added the comment: @Oliver Ruiz Dorantes I don't see how yuou reach that conclusion from what you're showing - it just looks like s mismatch bertween format string and arguments. If you can shrink it down to a small standalone script that demonstrates the problem, it would be

Re: downloading a CSV

2016-02-19 Thread Joel Goldstick
On Fri, Feb 19, 2016 at 3:05 PM, noydb wrote: > Thanks! That was pretty easy. > > import urllib.request > url = ' > http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.csv' > urllib.request.urlretrieve(url, csv_file) > csv_file =

Re: downloading a CSV

2016-02-19 Thread noydb
Thanks! That was pretty easy. import urllib.request url = 'http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.csv' urllib.request.urlretrieve(url, csv_file) csv_file = r"C:\Temp\earthquakeAll_last30days.csv" urllib.request.urlretrieve(url, csv_file) I do want to use python --

Re: Weird python 2.7 import thing

2016-02-19 Thread Dan Stromberg
On Fri, Feb 19, 2016 at 10:33 AM, Dan Stromberg wrote: > On Thu, Feb 18, 2016 at 5:40 PM, Dan Stromberg wrote: > >> >> BTW, this is not a package I pip installed from pypi - it's an >> internal-only project. > > I need to correct this: It's not installed

Re: downloading a CSV

2016-02-19 Thread Grant Edwards
On 2016-02-19, noydb wrote: > Greetings All, > > Python v 3.4, windows > > I want to be able to download this CSV file and save to disk >>> http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.csv Unless you really want to write a Python program, "wget" is a

[issue26393] random.shuffled

2016-02-19 Thread Aviv Palivoda
New submission from Aviv Palivoda: I am suggesting adding random.shuffled to the random module. This is very similar to the shuffle function just return a new shuffled list instead of in place shuffle. This is very similar to the sorted and list.sort. As you can see in the patch the shuffled

Re: downloading a CSV

2016-02-19 Thread MRAB
On 2016-02-19 18:46, noydb wrote: Greetings All, Python v 3.4, windows I want to be able to download this CSV file and save to disk http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.csv This (interacting with the web using python) is very new to me, so can anyone provide

[issue26377] Tkinter dialogs will not close if root window not packed.

2016-02-19 Thread Sam Yeager
Changes by Sam Yeager : Added file: http://bugs.python.org/file41974/1 Before closing window and box.png ___ Python tracker ___

[issue26377] Tkinter dialogs will not close if root window not packed.

2016-02-19 Thread Sam Yeager
Changes by Sam Yeager : Added file: http://bugs.python.org/file41975/2 After closing window and box.png ___ Python tracker ___

[issue21878] wsgi.simple_server's wsgi.input read/readline waits forever in certain circumstances

2016-02-19 Thread tzickel
tzickel added the comment: Just encountered this issue as well. It's not related to newlines, but to not supporting HTTP or persistent connections (the wsgi.input is the socket's I/O directly, and if the client serves a persistent connection, then the .read() will block forever). A simple

[issue26376] Tkinter root window won't close if packed.

2016-02-19 Thread Sam Yeager
Changes by Sam Yeager : Added file: http://bugs.python.org/file41973/2 After closing root window.png ___ Python tracker ___

[issue26376] Tkinter root window won't close if packed.

2016-02-19 Thread Sam Yeager
Sam Yeager added the comment: I've reverted to ActiveTcl 8.5.18. Issue persists. Uploading screenshots before and after attempting to close root window. -- Added file: http://bugs.python.org/file41972/1 Before closing root window.png ___ Python

downloading a CSV

2016-02-19 Thread noydb
Greetings All, Python v 3.4, windows I want to be able to download this CSV file and save to disk >> http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.csv This (interacting with the web using python) is very new to me, so can anyone provide direction on how to go about doing

Re: extending PATH on Windows?

2016-02-19 Thread eryk sun
On Fri, Feb 19, 2016 at 8:18 AM, Gisle Vanem wrote: > Dennis Lee Bieber wrote: > How can one search for files with DOS? >>> >>> dir /s /b \*add2path.* >>> >>> ChrisA >> >> Or move to PowerShell... >> >> Windows PowerShell >> Copyright (C) 2009 Microsoft Corporation.

Re: Processing multiple forms in a cgi script

2016-02-19 Thread Jeremy Leonard
On Friday, February 19, 2016 at 1:18:41 PM UTC-5, Jon Ribbens wrote: > On 2016-02-19, Jeremy Leonard wrote: > > I have a quick question regarding processing multiple forms. Most of > > my experience has been where there is just one form so the logic was > > pretty straight forward for me. My

Re: Weird python 2.7 import thing

2016-02-19 Thread Dan Stromberg
On Thu, Feb 18, 2016 at 5:40 PM, Dan Stromberg wrote: > > BTW, this is not a package I pip installed from pypi - it's an > internal-only project. I need to correct this: It's not installed from pypi.python.org, but it probably is installed from our internal pypi server.

Re: Passing data across callbacks in ThreadPoolExecutor

2016-02-19 Thread Ian Kelly
On Fri, Feb 19, 2016 at 10:18 AM, Joseph L. Casale wrote: >> It's still not clear to me specifically what you're trying to do. It >> would really help if you would describe the problem in more detail. >> Here's what I think you're trying to do: >> >> 1) Submit a task to

Re: Processing multiple forms in a cgi script

2016-02-19 Thread Grant Edwards
On 2016-02-19, Jon Ribbens wrote: > On 2016-02-19, Jeremy Leonard wrote: > >> I have a quick question regarding processing multiple forms. Most >> of my experience has been where there is just one form so the logic >> was pretty straight forward

Re: Processing multiple forms in a cgi script

2016-02-19 Thread Jon Ribbens
On 2016-02-19, Jeremy Leonard wrote: > I have a quick question regarding processing multiple forms. Most of > my experience has been where there is just one form so the logic was > pretty straight forward for me. My question revolves around how to > handle multiple forms.

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-19 Thread wrong . address . 1
On Friday, 19 February 2016 16:08:46 UTC+2, Tim Chase wrote: > On 2016-02-19 02:47, wrong.addres...@gmail.com wrote: > > 2 12.657823 0.1823467E-04 114 0 > > 3 4 5 9 11 > > "Lower" > > 278.15 > > > > Is it straightforward to read this, or does one have to read one > > character at a time and then

Processing multiple forms in a cgi script

2016-02-19 Thread Jeremy Leonard
I have a quick question regarding processing multiple forms. Most of my experience has been where there is just one form so the logic was pretty straight forward for me. My question revolves around how to handle multiple forms. I've seen that you can have an id for each form, but I'm unsure how

Re: Exception handling for socket.error in Python 3.5/RStudio

2016-02-19 Thread shaunak . bangale
On Monday, February 8, 2016 at 1:05:08 AM UTC-7, shaunak...@gmail.com wrote: > On Sunday, February 7, 2016 at 1:23:32 AM UTC-7, dieter wrote: > > Shaunak Bangale writes: > > > ... > > > while (count > 0): > > > try : > > > # read line from file: > > >

Re: extending PATH on Windows?

2016-02-19 Thread eryk sun
On Thu, Feb 18, 2016 at 10:55 AM, Ulli Horlacher wrote: > Ulli Horlacher wrote: > >> > but simpler still and more reliable to just call QueryValueEx. >> >> I find it more complicated. > > I have now (after long studying docs and

Re: extending PATH on Windows?

2016-02-19 Thread eryk sun
On Fri, Feb 19, 2016 at 4:48 AM, Chris Angelico wrote: > On Fri, Feb 19, 2016 at 9:42 PM, Ulli Horlacher > wrote: >> pyotr filipivich wrote: >> >>> > Windows (especially 7) search function is highly crippled. There is

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-19 Thread Grant Edwards
On 2016-02-19, BartC wrote: > >> IOW, you're expected to do things correctly > > You mean pedantically. :) > In real life, names generally are not case sensitive. I can call > myself bart or Bart or BART or any of the remaining 13 combinations, > without anyone getting confused

[issue26366] Use “.. versionadded” over “.. versionchanged” where appropriate

2016-02-19 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: Another reason to value the status-quo in this case is that this isn't just a matter for the Python documentation; it's about the recommended usage for the markup, which is used by many other packages. Questions that should be discussed include: 1. Should

[issue26366] Use “.. versionadded” over “.. versionchanged” where appropriate

2016-02-19 Thread Tony R.
Tony R. added the comment: > Part of the problem is getting the granularity right. The initial intent was > that 'version*' were annotations for the enclosing object (function, class, > method, etc.). If we want to have something more granular (parameter > added / deprecated / whatever), we

Re: Passing data across callbacks in ThreadPoolExecutor

2016-02-19 Thread Joseph L. Casale
> It's still not clear to me specifically what you're trying to do. It > would really help if you would describe the problem in more detail. > Here's what I think you're trying to do: > > 1) Submit a task to a ThreadPoolExecutor and get back a future. > > 2) When the task is complete, submit

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-19 Thread Matt Wheeler
On 19 February 2016 at 14:58, Peter Otten <__pete...@web.de> wrote: > Tim Chase wrote: >> [a long thing] > > Or just tell the parser what to expect: > > [another long thing] If you're sure all of the words on a line are going to be numbers then >>> [float(x) for x in '2 12.657823 0.1823467E-04

Re: extending PATH on Windows?

2016-02-19 Thread pyotr filipivich
Ulli Horlacher on Fri, 19 Feb 2016 10:42:52 + (UTC) typed in comp.lang.python the following: >pyotr filipivich wrote: > >> > Windows (especially 7) search function is highly crippled. There is >> >some command sequence that will

[issue26392] socketserver.BaseServer.close_server should stop serve_forever

2016-02-19 Thread Aviv Palivoda
New submission from Aviv Palivoda: Currently if you call server_close you only close the socket. If we called serve_forever and then call server_close without calling shutdown the serve_forever loop keep running. Before using the selectors module for doing the poll we would have had

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-19 Thread Chris Angelico
On Sat, Feb 20, 2016 at 3:32 AM, BartC wrote: > In real life, names generally are not case sensitive. I can call myself bart > or Bart or BART or any of the remaining 13 combinations, without anyone > getting confused (but they might be puzzled as to why I'd choose to spell it >

[issue25668] Deadlock in logging caused by a possible race condition with "format"

2016-02-19 Thread Oliver Ruiz Dorantes
Oliver Ruiz Dorantes added the comment: I am logging from a different thread than the thread which actually created the object. Though I am getting its reference in a very odd way I can reproduce the following while is not a deadlock, I believe is related: Traceback (most recent call last):

[issue23061] Update pep8 to specify explicitly 'module level' imports at top of file

2016-02-19 Thread Pas
Changes by Pas : -- nosy: +pas ___ Python tracker ___ ___ Python-bugs-list mailing list

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-19 Thread BartC
On 19/02/2016 15:59, Grant Edwards wrote: On 2016-02-19, BartC wrote: On 17/02/2016 19:49, wrong.addres...@gmail.com wrote: Could someone kindly tell me advantages and disadvantages of Python? Something I don't think anyone has mentioned is that Python is case-sensitive.

Re: Weird and sparese cgi:error

2016-02-19 Thread Φώντας Λαδοπρακόπουλος
[root@nexus cgi-bin]# head -10 ./metrites.py #!/usr/bin/python3 # coding=utf-8 import cgitb; cgitb.enable() import cgi, re, os, sys, socket, time, datetime, locale, codecs, random, smtplib, subprocess, pymysql, geoip2.database from datetime import datetime, timedelta from http import cookies

Re: Weird and sparese cgi:error

2016-02-19 Thread Φώντας Λαδοπρακόπουλος
#!/usr/bin/python3 # coding=utf-8 import cgitb; cgitb.enable() import cgi, re, os, sys, socket, time, datetime, locale, codecs, random, smtplib, subprocess, pymysql, geoip2.database from datetime import datetime, timedelta from http import cookies === [root@nexus cgi-bin]#

[issue26366] Use “.. versionadded” over “.. versionchanged” where appropriate

2016-02-19 Thread Georg Brandl
Georg Brandl added the comment: > Well then, if this is the sort of place where the status quo is sacred, > then there is nothing more to discuss. That wasn't my intention when quoting the old documenting guide, it was just to show what the intent was (and still is), and that I didn't just

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-19 Thread Grant Edwards
On 2016-02-19, Chris Angelico wrote: > and of course you wouldn't expect that to collide with something > written in a completely different script. As far as the interpreter's > concerned, "P" and "p" are just as different as are "A", "Α", "А", and > [...] ...and a, ã, á, ä,

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-19 Thread Grant Edwards
On 2016-02-19, BartC wrote: > On 17/02/2016 19:49, wrong.addres...@gmail.com wrote: > >> Could someone kindly tell me advantages and disadvantages of Python? > > Something I don't think anyone has mentioned is that Python is > case-sensitive. That's an _advantage_ not a

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-19 Thread Chris Angelico
On Sat, Feb 20, 2016 at 2:34 AM, BartC wrote: > On 17/02/2016 19:49, wrong.addres...@gmail.com wrote: > >> Could someone kindly tell me advantages and disadvantages of Python? > > > Something I don't think anyone has mentioned is that Python is > case-sensitive. > > So keywords,

[issue26366] Use “.. versionadded” over “.. versionchanged” where appropriate

2016-02-19 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: On Fri, Feb 19, 2016 at 10:02 AM, Tony R. wrote: > Holy crap! You all used to use LaTeX?! :D Python's documentation has a long & colorful history. :-) > Well then, if this is the sort of place where the status quo is sacred,

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-19 Thread BartC
On 17/02/2016 19:49, wrong.addres...@gmail.com wrote: Could someone kindly tell me advantages and disadvantages of Python? Something I don't think anyone has mentioned is that Python is case-sensitive. So keywords, identifiers, library functions and so on have to be written just right.

  1   2   >