[issue26181] argparse can't handle positional argument after list (help message is wrong)

2016-01-23 Thread SilentGhost
Changes by SilentGhost : -- nosy: +bethard versions: +Python 3.5, Python 3.6 -Python 3.4 ___ Python tracker ___

Re: import locale and print range on same line

2016-01-23 Thread Ramo
This works also but I thought it was possible to do it easier: import locale; locale.setlocale(locale.LC_ALL, ""); print('\n'.join(locale.format("%2f", i, 1) for i in range(1,20,4))) -- https://mail.python.org/mailman/listinfo/python-list

[issue26098] PEP 510: Specialize functions with guards

2016-01-23 Thread STINNER Victor
STINNER Victor added the comment: Patch version 4: * Keywords are now supported everywhere and tested by unit tests * Inline specode_check() into PyFunction_GetSpecializedCode() -- Added file: http://bugs.python.org/file41702/specialize-4.patch ___

[issue26146] PEP 511: Add ast.Constant to allow AST optimizer to emit constants

2016-01-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5de1bd759f3b by Victor Stinner in branch 'default': Issue #26146: marshal.loads() now uses the empty frozenset singleton https://hg.python.org/cpython/rev/5de1bd759f3b -- nosy: +python-dev ___ Python

[issue26149] Suggest PyCharm Community as an editor for Unix platforms

2016-01-23 Thread Ezio Melotti
Ezio Melotti added the comment: The two links for VIM and Emacs are useful for Unix developers that happen to use these editors, but I agree that we should link to the wiki instead of having other links to specific editors. If we want to recommend a few specific ones, we could list their names

[issue26177] tkinter: Canvas().keys returns empty strings.

2016-01-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Is avoiding splitlist calls when not needed worthwhile? We can't guarantee that future release of Tk wouldn't return a list of strings. Calling splitlist() for a tuple is cheap (but looks cumbersome). > I am a bit curious why Canvas gives a different

locale and for loop on same line

2016-01-23 Thread Ramo
Can someone tell me why this doesn't work? import locale; locale.setlocale(locale.LC_ALL, ""); for i in range(1,20,4): print(locale.format("%2f", i, 1)) It gives an error: SyntaxError: invalid syntax (highlighting the word 'for') I need this code on one and the same line. However when I

[issue25907] Documentation i18n: Added trans tags in sphinx templates

2016-01-23 Thread Julien
Julien added the comment: @haypo: And here is the patch for 2.7, and here is the result of the patch applied and new msgids translated: http://www.afpy.org/doc/python/2.7/ -- Added file: http://bugs.python.org/file41699/trans-tags-in-2.7.patch ___

Re: import locale and print range on same line

2016-01-23 Thread Vlastimil Brom
2016-01-23 11:36 GMT+01:00 Marko Rauhamaa : > rai...@gmail.com: > >> Can someone tell me why next code doesn't work? >> >> import locale; locale.setlocale(locale.LC_ALL, ""); for i in >> range(1,20,4): print(locale.format("%2f", i, 1)) >> >> It gives an error: SyntaxError:

[issue25907] Documentation i18n: Added trans tags in sphinx templates

2016-01-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 72edb81e456b by Victor Stinner in branch '2.7': doc: i18n HTML templates https://hg.python.org/cpython/rev/72edb81e456b -- ___ Python tracker

Re: one more question on regex

2016-01-23 Thread Vlastimil Brom
2016-01-22 23:47 GMT+01:00 mg : > Il Fri, 22 Jan 2016 21:10:44 +0100, Vlastimil Brom ha scritto: > >> [...] > > You explanation of re.findall() results is correct. My point is that the > documentation states: > > re.findall(pattern, string, flags=0) > Return all

[issue26146] PEP 511: Add ast.Constant to allow AST optimizer to emit constants

2016-01-23 Thread STINNER Victor
STINNER Victor added the comment: > New changeset 5de1bd759f3b by Victor Stinner in branch 'default': > Issue #26146: marshal.loads() now uses the empty frozenset singleton > https://hg.python.org/cpython/rev/5de1bd759f3b This change is not directly related to this issue. It's required by

Re: import locale and print range on same line

2016-01-23 Thread Chris Angelico
On Sun, Jan 24, 2016 at 12:07 AM, Steven D'Aprano wrote: > On Sat, 23 Jan 2016 09:02 pm, rai...@gmail.com wrote: > >> However I need to put the code on one single line. > > Why? Is the Enter key on your keyboard broken? Maybe it's for a python -c invocation. ChrisA --

Re: import locale and print range on same line

2016-01-23 Thread Ramo
The reason why I want to have it on onto one line has nothing to do with my question, "why doesn't it work on one line" :) But if you want to know it, I use this python code in the commandline of a texteditor :) Btw.. thank you all for your help. Very happy with it :) --

[issue26149] Suggest PyCharm Community as an editor for Unix platforms

2016-01-23 Thread Georg Brandl
Georg Brandl added the comment: > The doc section is woefully incomplete and unix-specific. That might be because the doc section is called "Using Python on Unix platforms". -- nosy: +georg.brandl ___ Python tracker

[issue25907] Documentation i18n: Added trans tags in sphinx templates

2016-01-23 Thread INADA Naoki
INADA Naoki added the comment: O/T Hi, Julien. I'm maintainer of Python Document Japanese translation project. (http://docs.python.jp/ ) We use Transifex to ease many volunteers working on translating. https://www.transifex.com/python-doc-ja/python-35/dashboard/ Repository of Python 3.5

[issue25907] Documentation i18n: Added trans tags in sphinx templates

2016-01-23 Thread Julien
Julien added the comment: @naoki Not sure, but with those patches you'll may be able to translate the documentation without forking it. Like we're doing here: https://github.com/afpy/python_doc_fr Also did you contacted the upstream to ask them if they want to cross-link your versions ?

[issue26185] zipfile.ZipInfo slots can raise unexpected AttributeError

2016-01-23 Thread SilentGhost
Changes by SilentGhost : -- stage: -> patch review ___ Python tracker ___ ___

[issue26185] zipfile.ZipInfo slots can raise unexpected AttributeError

2016-01-23 Thread SilentGhost
Changes by SilentGhost : -- nosy: +alanmcintyre, serhiy.storchaka, twouters ___ Python tracker ___

[issue26183] 2.7.11 won't clean install on Windows 10 x64

2016-01-23 Thread SilentGhost
Changes by SilentGhost : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___

[issue26146] PEP 511: Add ast.Constant to allow AST optimizer to emit constants

2016-01-23 Thread STINNER Victor
STINNER Victor added the comment: @Serhiy: Would you mind reviewing constant-2.patch? I reviewed my own patch and added some comments, I found a refleak ;-) -- ___ Python tracker

Re: How to simulate C style integer division?

2016-01-23 Thread Grobu
On 22/01/16 04:48, Steven D'Aprano wrote: [ ... ] math.trunc( float(a) / b ) That fails for sufficiently big numbers: py> a = 3**1000 * 2 py> b = 3**1000 py> float(a)/b # Exact answer should be 2 Traceback (most recent call last): File "", line 1, in OverflowError: long int too large

Re: import locale and print range on same line

2016-01-23 Thread Steven D'Aprano
On Sat, 23 Jan 2016 09:02 pm, rai...@gmail.com wrote: > However I need to put the code on one single line. Why? Is the Enter key on your keyboard broken? -- Steven -- https://mail.python.org/mailman/listinfo/python-list

[issue19883] Integer overflow in zipimport.c

2016-01-23 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka added the comment: > Updated patch addresses Victor's comments and adds (mandatory now) > parenthesis. Thank you Victor. Do you mean braces {...}? The new patch looks good to me, thanks for taking all my comments in account ;-) --

Re: How to simulate C style integer division?

2016-01-23 Thread Grobu
def intdiv(a, b): return (a - (a % (-b if a < 0 else b))) / b Duh ... Got confused with modulos (again). def intdiv(a, b): return (a - (a % (-abs(b) if a < 0 else abs(b / b -- https://mail.python.org/mailman/listinfo/python-list

Re: import locale and print range on same line

2016-01-23 Thread Steven D'Aprano
On Sun, 24 Jan 2016 12:19 am, Chris Angelico wrote: > On Sun, Jan 24, 2016 at 12:07 AM, Steven D'Aprano > wrote: >> On Sat, 23 Jan 2016 09:02 pm, rai...@gmail.com wrote: >> >>> However I need to put the code on one single line. >> >> Why? Is the Enter key on your keyboard

[issue19883] Integer overflow in zipimport.c

2016-01-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch addresses Victor's comments and adds (mandatory now) parenthesis. Thank you Victor. -- assignee: -> serhiy.storchaka Added file: http://bugs.python.org/file41697/zipimport_int_overflow_4.patch ___

[issue26185] zipfile.ZipInfo slots can raise unexpected AttributeError

2016-01-23 Thread Matthew Zipay
New submission from Matthew Zipay: The zipfile.ZipInfo.__init__ method permits several of ZipInfo's slot attributes to go uninitialized unless the object is obtained from ZipFile.getinfo() or ZipFile.infolist(). As a result, accessing those attributes (header_offset, CRC, compress_size, or

Re: import locale and print range on same line

2016-01-23 Thread Marko Rauhamaa
rai...@gmail.com: > Can someone tell me why next code doesn't work? > > import locale; locale.setlocale(locale.LC_ALL, ""); for i in > range(1,20,4): print(locale.format("%2f", i, 1)) > > It gives an error: SyntaxError: invalid syntax --> indicating 'for' > > However I need to put the code on one

[issue25907] Documentation i18n: Added trans tags in sphinx templates

2016-01-23 Thread STINNER Victor
STINNER Victor added the comment: > @haypo: And here is the patch for 2.7, and here is the result of the patch > applied and new msgids translated: http://www.afpy.org/doc/python/2.7/ Thanks. I also pushed this change. @INADA Naoki, @Julien: Don't hesitate to bug me if you want to push other

import locale and print range on same line

2016-01-23 Thread raiwil
Can someone tell me why next code doesn't work? import locale; locale.setlocale(locale.LC_ALL, ""); for i in range(1,20,4): print(locale.format("%2f", i, 1)) It gives an error: SyntaxError: invalid syntax --> indicating 'for' However I need to put the code on one single line. When I separate

[issue26182] Deprecation warnings for the future async and await keywords

2016-01-23 Thread SilentGhost
Changes by SilentGhost : -- components: +asyncio nosy: +giampaolo.rodola, gvanrossum, haypo, pitrou, yselivanov ___ Python tracker

Re: locale and for loop on same line

2016-01-23 Thread Bev in TX
According to the documentation, "...simple statements may occur on a single line separated by semicolons." The "for" statement is a compound, not simple, statement. Would it be possible to place your statements in a function and then you would just need to invoke the function? Bev in TX On

Re: import locale and print range on same line

2016-01-23 Thread Chris Angelico
On Sun, Jan 24, 2016 at 12:45 AM, Steven D'Aprano wrote: > On Sun, 24 Jan 2016 12:19 am, Chris Angelico wrote: > >> On Sun, Jan 24, 2016 at 12:07 AM, Steven D'Aprano >> wrote: >>> On Sat, 23 Jan 2016 09:02 pm, rai...@gmail.com wrote: >>> However I

[issue26058] PEP 509: Add ma_version to PyDictObject

2016-01-23 Thread STINNER Victor
STINNER Victor added the comment: Patch version 6: remove now unused function _testcapi.dict_set_version(). I also moved tests to test_pep509.py to make it more explicit that the implementation of the PEP 509 is not part the Python dictionary type specification, other Python implementations

[issue26145] PEP 511: Add sys.set_code_transformers()

2016-01-23 Thread STINNER Victor
STINNER Victor added the comment: > Note: ast.PyCF_TRANSFORMED_AST is not implemented yet. Additionnal pycf_transformed_ast.patch implements it. The patch should be applied on top of transformers-4.patch. Note: PyCF_TRANSFORMED_AST has the same value (0x1000) than the old constant

Re: How to simulate C style integer division?

2016-01-23 Thread Jussi Piitulainen
Grobu writes: >> def intdiv(a, b): >> return (a - (a % (-b if a < 0 else b))) / b >> >> > > Duh ... Got confused with modulos (again). > > def intdiv(a, b): > return (a - (a % (-abs(b) if a < 0 else abs(b / b You should use // here to get an exact integer result. --

Re: Question about asyncio and blocking operations

2016-01-23 Thread Frank Millman
"Frank Millman" wrote in message news:n8038j$575$1...@ger.gmane.org... So I thought I would ask here if anyone has been through a similar exercise, and if what I am going through sounds normal, or if I am doing something fundamentally wrong. Thanks for any input Just a quick note of

[issue26187] sqlite3 trace callback prints duplicate line

2016-01-23 Thread Aviv Palivoda
New submission from Aviv Palivoda: I am running the following script: -- >>> import sqlite3 >>> import os >>> import time >>> con1 = sqlite3.connect("/tmp/test.db") >>> con2 = sqlite3.connect("/tmp/test.db") >>> con1.set_trace_callback(print) >>> cur =

Re: pip install mitmproxy - fails on watchdog-0.8.3.tar.gz with "Permission denied" error (Python 2.7.11 on Win XP SP3);

2016-01-23 Thread Chris Angelico
On Sun, Jan 24, 2016 at 6:43 AM, Steve Petrie, P.Eng. wrote: > In case other Windows XP "orphans" want to use mitmdump, here's what I > learned (via Google): > > I changed the bang line (wrapping the pathname in double quotes) in file > mitmdump-script.py: > > from: #!e:\a

FW: Bill Sconce memorial, SAT 13 FEB, Boire Field, Nashua, NH

2016-01-23 Thread Ben Scott
:-( -- Forwarded message -- From: mad...@li.org Date: Sat, Jan 16, 2016 at 2:11 PM Subject: Bill Sconce obituary and memorial date (February 13th at Boire Field, Nashua, NH) To: "Linux, Greater" Cc: "Hall, Jon"

Re: Question about asyncio and blocking operations

2016-01-23 Thread Chris Angelico
On Sun, Jan 24, 2016 at 1:38 AM, Frank Millman wrote: > I find I am bumping my head more that I expected, so I thought I would try > to get some feedback here to see if I have some flaw in my approach, or if > it is just in the nature of writing an asynchronous-style

Re: How to simulate C style integer division?

2016-01-23 Thread Grobu
On 23/01/16 16:07, Jussi Piitulainen wrote: Grobu writes: def intdiv(a, b): return (a - (a % (-b if a < 0 else b))) / b Duh ... Got confused with modulos (again). def intdiv(a, b): return (a - (a % (-abs(b) if a < 0 else abs(b / b You should use // here to get an exact

Re: import locale and print range on same line

2016-01-23 Thread Chris Angelico
On Sun, Jan 24, 2016 at 1:03 AM, Ramo wrote: > The reason why I want to have it on onto one line has nothing to do with my > question, "why doesn't it work on one line" :) > > But if you want to know it, I use this python code in the commandline of a > texteditor :) Called

pip install mitmproxy - fails on watchdog-0.8.3.tar.gz with "Permission denied" error (Python 2.7.11 on Win XP SP3);

2016-01-23 Thread Steve Petrie, P.Eng.
Greetings To Python-list, I'm trying to install Python package: mitmproxy (https://mitmproxy.org/) on Windows XP SP3. I'm a complete Python newbie. Not planning to do any Python programming at this time. Just trying to get package mitmproxy working (or at least the mitmdump component,

Re: Question about asyncio and blocking operations

2016-01-23 Thread Ian Kelly
On Sat, Jan 23, 2016 at 8:44 AM, Ian Kelly wrote: > This is where it would make sense to me to use callbacks instead of > subroutines. You can structure your __init__ method like this: Doh. s/subroutines/coroutines -- https://mail.python.org/mailman/listinfo/python-list

[issue26169] Pasting 900000 chars into a tk Entry widget fails

2016-01-23 Thread Soufiane BOUSSALI
Soufiane BOUSSALI added the comment: thanks terry reedy For Fixing This Stack Overflow :) -- ___ Python tracker ___

Re: pip install mitmproxy - fails on watchdog-0.8.3.tar.gz with "Permission denied" error (Python 2.7.11 on Win XP SP3);

2016-01-23 Thread Chris Angelico
On Fri, Jan 22, 2016 at 3:40 AM, Steve Petrie, P.Eng. wrote: > In both failure cases, it looks to me like there is a bug in the pip logic, > that is using a *nix forward slash "/" instead of a double backslash "\\" > before the file name "make.bat". I'm not sure what your

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-01-23 Thread Brett Cannon
Brett Cannon added the comment: One way to possibly improve this is to remove the create_module() check and replace it with a warning if create_module() doesn't return None. Another option is to use an assert statement. The final option is to just drop the check entirely, although that can

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-01-23 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +eric.snow, ncoghlan ___ Python tracker ___ ___

Re: Question about asyncio and blocking operations

2016-01-23 Thread Ian Kelly
On Sat, Jan 23, 2016 at 7:38 AM, Frank Millman wrote: > Here is the difficulty. The recommended way to handle a blocking operation > is to run it as task in a different thread, using run_in_executor(). This > method is a coroutine. An implication of this is that any method

[issue26183] 2.7.11 won't clean install on Windows 10 x64

2016-01-23 Thread Steve Dower
Steve Dower added the comment: This is trying to remove 2.7.10, so I guess it's not as clean as you think. You'll need to repair the 2.7.10 install (not just reinstall it - it has to be the right version so you can choose repair) and then try again. --

Re: Same function but different names with different set of default arguments

2016-01-23 Thread Paulo da Silva
Às 07:30 de 21-01-2016, Paulo da Silva escreveu: > Hi all. > > What is the fastest implementation of the following code? > > def g(p): > ... > return something > > def f1(p="p1"): > return g(p) > > def f2(p="p2"): > return g(p) > Thanks to all who responded. I'll try

Question about asyncio and blocking operations

2016-01-23 Thread Frank Millman
Hi all I am developing a typical accounting/business application which involves a front-end allowing clients to access the system, a back-end connecting to a database, and a middle layer that glues it all together. Some time ago I converted the front-end from a multi-threaded approach to an

Release of PyGreSQL version 4.2

2016-01-23 Thread D'Arcy J.M. Cain
The PyGreSQL team is please to announce release 4.2 of PyGreSQL. It is available at: http://pygresql.org/files/PyGreSQL-4.2.tgz. If you are running NetBSD, look in the packages directory under databases for py-postgresql. There should also be a package in the FreeBSD ports collection. Please

Deprecation warning for async and await

2016-01-23 Thread Marco Buttu
I enabled the deprecation warning in Python 3.5.1 and Python 3.6 dev, but I did not get any warning when assigning to async or await: $ python -Wd -c "import sys; print(sys.version); async = 33" 3.5.1 (default, Jan 21 2016, 19:59:28) [GCC 4.8.4] Is it normal? -- Marco Buttu INAF-Osservatorio

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-01-23 Thread Brett Cannon
New submission from Brett Cannon: It was privately reported to me that importlib.util.LazyLoader rejects using importlib.machinery.SourceFileLoader (or at least _frozen_importlib.SourceFileLoader). At least a test should be added for LazyLoader to make sure it will happily accept

Install Numba on Debian

2016-01-23 Thread Dave Farrance
I'd like to install Numba on Debian Jessie to work with the system Python 2.7.9 (rather than installing Anaconda). When I follow the instructions at https://github.com/numba/numba#custom-python-environments ...I get errors when trying to install Numba either with the git clone method or

How do I add 18 seconds ISO-8301 String in Python?

2016-01-23 Thread Robert James Liguori
How do I add 18 seconds to this string in Python? 2000-01-01T16:36:25.000Z -- https://mail.python.org/mailman/listinfo/python-list

[issue26189] Interpreter returns control to cmd.exe early

2016-01-23 Thread Zachary Ware
Zachary Ware added the comment: What version of Python are you using, where did you get it from, and what version of Windows are you using? -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker

Calculating longitudinal acceleration, lateral acceleration and normal acceleration

2016-01-23 Thread Robert James Liguori
Is there a python library to calculate longitudinal acceleration, lateral acceleration and normal acceleration? Thanks. -- https://mail.python.org/mailman/listinfo/python-list

Re: How do I add 18 seconds to an ISO-8601 String in Python?

2016-01-23 Thread Robert James Liguori
Thank you so much! Btw, how do I convert back to ISO-8301? -- https://mail.python.org/mailman/listinfo/python-list

Re: import locale and print range on same line

2016-01-23 Thread Chris Angelico
On Sun, Jan 24, 2016 at 1:45 PM, Terry Reedy wrote: > C:\Users\Terry>python -c "for i in range(5):\n\tprint('hello world')" > File "", line 1 > for i in range(5):\n print('hello world') > ^ > SyntaxError: unexpected character

[issue26189] Interpreter returns control to cmd.exe early

2016-01-23 Thread Ivan Pozdeev
Ivan Pozdeev added the comment: This also happens when running interactively - so the interactive interpreter has to be run from a non-console program to be usable. This doesn't happen with other programs (e.g. Cygwin bash) or IPython console. -- title: Non-interactive interpreter

[issue26160] Tutorial incorrectly claims that (explicit) relative imports don't work in the main module

2016-01-23 Thread Kevin Norris
Kevin Norris added the comment: >It could be misleading saying “the name of the current package”, because the >import could be relative to the a higher level parent package if more than one >dot is specified. While this is correct, Python still uses __package__ to determine what to import in

Re: How do I add 18 seconds to an ISO-8601 String in Python?

2016-01-23 Thread Ben Finney
Robert James Liguori writes: (I've corrected the Subject field. The standard you're referring to is ISO 8601, I believe.) > How do I add 18 seconds to this string in Python? > > 2000-01-01T16:36:25.000Z Two separate parts: * How do I get a timestamp object from a text

[issue23076] list(pathlib.Path().glob("")) fails with IndexError

2016-01-23 Thread Thomas Nyberg
Thomas Nyberg added the comment: I added a patch which causes glob to raise a ValueError exception if it is called with an empty string. I also added a test verifying the change and have run all the tests and they pass. Though I've been reading the developer guide, I'm a bit unfamiliar with

[issue26186] LazyLoader rejecting use of SourceFileLoader

2016-01-23 Thread Keith Dart
Changes by Keith Dart : -- nosy: +kdart ___ Python tracker ___ ___ Python-bugs-list

Re: Question about how to do something in BeautifulSoup?

2016-01-23 Thread Cody Piersall
On Fri, Jan 22, 2016 at 8:01 AM, inhahe wrote: > Say I have the following HTML (I hope this shows up as plain text here > rather than formatting): > > "Is > today the day?" > > And I want to extract the "Is today the day?" part. There are other places > in the document with and

Re: Install Numba on Debian

2016-01-23 Thread Dave Farrance
Dave Farrance wrote: >I'd like to install Numba on Debian Jessie to work with the system >Python 2.7.9 (rather than installing Anaconda). OK, never mind. Fixed. By Googling the first error code, finding a suggested fix for that, running again, Googling the new error,

[issue26188] Provide more helpful error message when `await` is called inside non-`async` method

2016-01-23 Thread Nicholas Chammas
New submission from Nicholas Chammas: Here is the user interaction: ```python $ python3 Python 3.5.1 (default, Dec 7 2015, 21:59:10) [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.1.76)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> def oh_hai(): ...

Re: How do I add 18 seconds to an ISO-8601 String in Python?

2016-01-23 Thread Robert James Liguori
Oh... How do I convert it back to ISO 8301? -- https://mail.python.org/mailman/listinfo/python-list

Re: How do I add 18 seconds to an ISO-8601 String in Python?

2016-01-23 Thread Robert James Liguori
I cant thank you enough -- https://mail.python.org/mailman/listinfo/python-list

[issue26189] Non-interactive interpreter returns control to cmd.exe early

2016-01-23 Thread Ivan Pozdeev
New submission from Ivan Pozdeev: When running python.exe from windows console non-interactively, cmd.exe prompt appears immediately after starting: C:\>python -c "import time; time.sleep(2); print 'bla-bla-bla'" C:\>bla-bla-bla Not only this prevents from cmd to setting ERRORLEVEL to the

[issue26074] Add a method to pip.. pip.require("package_name")

2016-01-23 Thread Blaize Rhodes
Blaize Rhodes added the comment: Righto.. will talk to the pip dudes. Thanks for your time. (@matrixise The reason I posted this here is because pip is included as part of the cpython distribution. None of the documentation I've seen suggests that this isn't a forum for discussing the std

Re: import locale and print range on same line

2016-01-23 Thread Terry Reedy
On 1/23/2016 8:58 AM, Chris Angelico wrote: On Sun, Jan 24, 2016 at 12:45 AM, Steven D'Aprano wrote: On Sun, 24 Jan 2016 12:19 am, Chris Angelico wrote: On Sun, Jan 24, 2016 at 12:07 AM, Steven D'Aprano wrote: On Sat, 23 Jan 2016 09:02 pm,

Re: How do I add 18 seconds to an ISO-8601 String in Python?

2016-01-23 Thread Michael Torrie
On 01/23/2016 07:22 PM, Robert James Liguori wrote: > Thank you so much! Btw, how do I convert back to ISO-8301? Have a look at the documentation for the datetime module. The docs will tell you how you can convert to a string, formatted to your specifications and needs. As always, the

Re: Calculating longitudinal acceleration, lateral acceleration and normal acceleration

2016-01-23 Thread Bernardo Sulzbach
Showing any bits of input would help us help you. Your question also seems too vague. Almost a "how to optimize". -- https://mail.python.org/mailman/listinfo/python-list

[issue26189] Interpreter returns control to cmd.exe early

2016-01-23 Thread Steve Dower
Steve Dower added the comment: That'd suggest a change in the link options since 2.7.10, probably SUBSYSTEM. Or possibly there's a config option that prevents allocating a console correctly on startup. FWIW, I don't think WinXP 64-bit was ever considered trustworthy, so it may be a bug in

Re: Calculating longitudinal acceleration, lateral acceleration and normal acceleration

2016-01-23 Thread Steven D'Aprano
On Sunday 24 January 2016 11:27, Robert James Liguori wrote: > Is there a python library to calculate longitudinal acceleration, lateral > acceleration and normal acceleration? Calculate acceleration of what? I think we need some more detail before we can give a sensible answer, but you could

[issue26189] Interpreter returns control to cmd.exe early

2016-01-23 Thread Ivan Pozdeev
Ivan Pozdeev added the comment: Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:40:30) [MSC v.1500 64 bit (AMD64)] on win32 WinXP x64 SP2 I also tested with PowerShell 1.0. Python opens another window, but the shell's prompt also shows up immediately. --

Re: How do I add 18 seconds to an ISO-8601 String in Python?

2016-01-23 Thread Ben Finney
Robert James Liguori writes: > Thank you so much! Btw, how do I convert back to ISO-8301? You are consistently referring to “ISO 8301”, but I am confident that you are not intending to talk about: ISO 8301: Thermal insulation -- Determination of steady-state

[issue26189] Interpreter returns control to cmd.exe early

2016-01-23 Thread Eryk Sun
Eryk Sun added the comment: Try forcing cmd to wait using the "start" command: C:\>start /b /w python -c "raise SystemExit(42)" C:\>echo %errorlevel% 42 -- nosy: +eryksun ___ Python tracker

Re: Calculating longitudinal acceleration, lateral acceleration and normal acceleration

2016-01-23 Thread Steven D'Aprano
Second attempt. On Sunday 24 January 2016 11:27, Robert James Liguori wrote: > Is there a python library to calculate longitudinal acceleration, lateral > acceleration and normal acceleration? Calculate acceleration of what? I think we need some more detail before we can give a sensible