Re: Oh gods can we get any more off-topic *wink* [was Re: [Python-ideas] Inconsistencies]

2016-09-16 Thread Gregory Ewing
Marko Rauhamaa wrote: It is actually quite interesting how the brain forms an accurate idea of a straight line and, say, a circle. Whenever you get a new pair of glasses, the brain needs a recalibration and manages to do it within a week. I had an interesting experience in that area a few

[issue28178] allow to cache_clear(some_key) in lru_cache

2016-09-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Method with name clear() usually removes all content. It would be better to use different name: remove() or invalidate() (is there a precedence in other caches?). -- nosy: +ncoghlan, rhettinger, serhiy.storchaka versions: +Python 3.7

[issue28179] Segfault in test_recursionlimit_fatalerror

2016-09-16 Thread Berker Peksag
New submission from Berker Peksag: This is a follow-up from msg275748 in issue 27213 (Rework CALL_FUNCTION* opcodes). I believe the test_runpy failure I mentioned there is also the same error, but this one can be reproduced easily. test_recursionlimit_fatalerror in SysModuleTest

[issue28139] Misleading Indentation in C source code

2016-09-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In general LGTM. This is not cosmetic change, this fixes readability of the sources. But I left few comments on Rietveld. -- assignee: -> martin.panter nosy: +serhiy.storchaka ___ Python tracker

[issue26050] Add new StreamReader.readuntil() method

2016-09-16 Thread Марк Коренберг
Марк Коренберг added the comment: It needs to compare python functoin(s) docstrings with separate documentation. All information from docstrings should also be written in separate docs. Will compare later. -- ___ Python tracker

[issue27348] traceback (and threading) drops exception message

2016-09-16 Thread STINNER Victor
STINNER Victor added the comment: "Issue #27348: In the traceback module, restore the formatting of exception messages like "Exception: None". This fixes a regression introduced in 3.5a2." Humn, if it is described as a regression, it means that it's a bug no? You plan to push the change into

Re: how to automate java application in window using python

2016-09-16 Thread meInvent bbird
On Friday, September 16, 2016 at 2:26:47 AM UTC+8, bream...@gmail.com wrote: > On Thursday, September 15, 2016 at 8:13:05 AM UTC+1, meInvent bbird wrote: > > how to automate java application in window using python > > > > 1. scroll up or down of scroll bar > > 2. click button > > 3. type text in

[issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return

2016-09-16 Thread Xiang Zhang
Xiang Zhang added the comment: Yes, ignoring exceptions is due to historical reasons. Although it's used rarely but I am still afraid changing it may break knowledge of devs that are already familiar with dict APIs. And what's more is there already exists two versions of getitem, one version

how to robot recognize basic geometric object in window or ubuntu window

2016-09-16 Thread meInvent bbird
i am doing a robot to automate window itself with python i give some basic png diagram such as square, circle, triangle and hope it recognize all kinds of square like things in window such as textbox of notepad etc how a robot recognize basic geometric object in window or ubuntu window i use

Re: how to automate java application in window using python

2016-09-16 Thread meInvent bbird
On Thursday, September 15, 2016 at 3:52:41 PM UTC+8, Lawrence D’Oliveiro wrote: > On Thursday, September 15, 2016 at 7:13:05 PM UTC+12, meInvent bbird wrote: > > how to automate java application in window using python > > > > 1. scroll up or down of scroll bar > > 2. click button > > 3. type text

Re: how to automate java application in window using python

2016-09-16 Thread Lawrence D’Oliveiro
On Friday, September 16, 2016 at 6:55:07 PM UTC+12, meInvent bbird wrote: > On Thursday, September 15, 2016 at 3:52:41 PM UTC+8, Lawrence D’Oliveiro > wrote: >> On Thursday, September 15, 2016 at 7:13:05 PM UTC+12, meInvent bbird >> wrote: >>> how to automate java application in window using

[issue28178] allow to cache_clear(some_key) in lru_cache

2016-09-16 Thread Sébastien de Menten
New submission from Sébastien de Menten: It would be useful to be able to clear a single item in the cache of a lru_cache decorated function. Currently with: @lru_cache def foo(i): return i*2 foo(1)# -> add 1 as key in the cache foo(2)# -> add 2 as key in the cache foo.clear_cache()

Re: Requests for webbrowser module

2016-09-16 Thread Jamie Ansell
Thanks for your help, I realise that what I wanted was chromes default new tab page, not a blank page. 'about:blank' worked fine but it wasn't what I wanted sorry. I'll try the CTRL+4 later and see it that works. On 14 Sep 2016 21:11, "John Gordon" wrote: > In

[issue27415] regression: BaseEventLoop.create_server does not accept port=None

2016-09-16 Thread Berker Peksag
Berker Peksag added the comment: 3.4 is in security-fix-only mode so it doesn't get bugfix updates anymore. -- nosy: +berker.peksag resolution: -> out of date status: open -> closed versions: +Python 3.5 ___ Python tracker

[issue27415] regression: BaseEventLoop.create_server does not accept port=None

2016-09-16 Thread Marcus Cobden
Marcus Cobden added the comment: Ah thanks, that's fair. It seems a shame since this regression was introduced to 3.4 by a security/bugfix release. Since there's a workaround it's not a big deal. -- ___ Python tracker

[issue28180] sys.getfilesystemencoding() should default to utf-8

2016-09-16 Thread Jan Niklas Hasse
New submission from Jan Niklas Hasse: Working with Docker I often end up with an environment where the locale isn't correctly set. In these cases it would be great if sys.getfilesystemencoding() could default to 'utf-8' instead of 'ascii', as it's the encoding of the future and ascii is a

[issue27391] server_hostname should only be required when checking host names

2016-09-16 Thread Christian Heimes
Christian Heimes added the comment: You are still ignoring my remarks about TLS SNI. :) Python uses server_hostname for two different but related parts of the TLS/SSL. 1) When server_hostname is set, the client sends the hostname to the server during the TLS handshake in the ClientHello

Re: Expected type 'optional[bytes]' got 'str' instead

2016-09-16 Thread Peter Otten
> Daiyue Weng wrote: [Please answer to the mailing list instead of sending private emails] > On 13 September 2016 at 12:37, Peter Otten <__pete...@web.de> wrote: >> Daiyue Weng wrote: >>> Hi, I have the following piece of code, >>> >>> rootPath = os.path.abspath(__file__) >>> >>> rootPath =

[issue27348] traceback (and threading) drops exception message

2016-09-16 Thread Martin Panter
Martin Panter added the comment: Yes, a bug fix for 3.5+. -- ___ Python tracker ___ ___ Python-bugs-list

[issue28134] socket.socket(fileno=fd) does not work as documented

2016-09-16 Thread Christian Heimes
Christian Heimes added the comment: How about we fix the code and only document the limitations instead? :) After all it works fine on Windows and it is documented to work on all operating systems. Since it's a bug we can fix it in 3.5, too. My patch implements a best-effort to get type,

[issue28179] Segfault in test_recursionlimit_fatalerror

2016-09-16 Thread Berker Peksag
Changes by Berker Peksag : Added file: http://bugs.python.org/file44688/full_output.txt ___ Python tracker ___

[issue25270] codecs.escape_encode systemerror on empty byte string

2016-09-16 Thread Berker Peksag
Berker Peksag added the comment: Here is an updated patch. -- versions: +Python 3.7 Added file: http://bugs.python.org/file44689/issue25270_v2.diff ___ Python tracker

[issue27415] regression: BaseEventLoop.create_server does not accept port=None

2016-09-16 Thread Marcus Cobden
Marcus Cobden added the comment: Still doesn't work in Python 3.4.5; I can confirm it's fixed in Python 3.5.2. -- resolution: works for me -> status: closed -> open versions: -Python 3.5 ___ Python tracker

Re: how to automate java application in window using python

2016-09-16 Thread Christian Gollwitzer
Am 16.09.16 um 09:01 schrieb Lawrence D’Oliveiro: On Friday, September 16, 2016 at 6:55:07 PM UTC+12, meInvent bbird wrote: On Thursday, September 15, 2016 at 3:52:41 PM UTC+8, Lawrence D’Oliveiro wrote: On Thursday, September 15, 2016 at 7:13:05 PM UTC+12, meInvent bbird wrote: how to

Find Nested group in LDAP by this i mean group in group

2016-09-16 Thread Robert Clove
Hi, I was looking for search query in LDAP for nested group memebership. It would be great if someone can provide the python code for the same. Regards -- https://mail.python.org/mailman/listinfo/python-list

[issue27761] Private _nth_root function loses accuracy

2016-09-16 Thread Mark Dickinson
Mark Dickinson added the comment: > Mark, the code I showed in roots.py is somewhat more accurate and highly > significantly faster than the code you just posted. Okay, fair enough. In that case, we still need a solution for computing rootn(x * 2**e) in the case where x*2**e itself overflows

[issue16700] Document that bytes OS API can returns unusable results on Windows

2016-09-16 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue28183] Clean up and speed up dict iteration

2016-09-16 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: In some circumstances iterating dict under 3.6 can be 20% slower than under 3.5. $ ./python -m perf timeit -s "d = dict.fromkeys(range(10**6))" -- "list(d)" Python 3.5: Median +- std dev: 33.8 ms +- 0.7 ms Python 3.6: Median +- std dev: 37.8 ms +- 0.5 ms

[issue27761] Private _nth_root function loses accuracy

2016-09-16 Thread Tim Peters
Tim Peters added the comment: Oops! The `D2**e` in that code should be `pow(D2, e)`, to make it use the correct decimal context. -- ___ Python tracker

[issue16700] Document that bytes OS API can returns unusable results on Windows

2016-09-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Maybe this issue is outdated in 3.6 (thanks to PEP 529), but this still is a problem under 3.5 and 2.7. -- status: closed -> open versions: +Python 3.5 -Python 3.3, Python 3.4 ___ Python tracker

Re: why this code loop forever after a draw a rectangle

2016-09-16 Thread Gary Herron
On 09/16/2016 05:18 AM, meInvent bbird wrote: i follow this post to give some time it to operate, wait a long time still looping http://answers.opencv.org/question/60094/libpng-warning-image-width-is-zero-in-ihdr/ i can not stand this Ninja coding life any more, i have to open my code for ask

[issue27761] Private _nth_root function loses accuracy

2016-09-16 Thread Mark Dickinson
Mark Dickinson added the comment: > And it's still the case that I haven't found a case where its result isn't > correctly rounded. Here's one: :-) >>> rootn(1 + 2**-52, 2) 1.0002 The correctly rounded result would be 1.0. -- ___

[issue27922] Make IDLE tests less flashy

2016-09-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: It is more a matter of tradeoffs rather than 'okay'. There is no general pydev rule against gui flashing. The tk and ttk gui tests still do, but that is primarily Serhiy's concern. The IDLE tests are at most perhaps a third complete, so they would have

[issue28111] geometric_mean can raise OverflowError for large input length

2016-09-16 Thread Mark Dickinson
Changes by Mark Dickinson : -- title: geometric_mean can raise OverflowError when checking for inf -> geometric_mean can raise OverflowError for large input length ___ Python tracker

[issue15443] datetime module has no support for nanoseconds

2016-09-16 Thread Steve Holden
Steve Holden added the comment: I agree on reflection that a single nanoseconds integral value makes more sense. This then requires refactoring of the existing code so that existing tests continue to pass using a microsecond property. Code using ONLY nanoseconds is a disjoint case, for which

[issue28179] Segfault in test_recursionlimit_fatalerror

2016-09-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Running with fresh build from IDLE in a subprocess on Win10, with 15 instead of 10, I quickly get a fatal Python error and the Windows box equivalent to a segfault. -- nosy: +terry.reedy ___ Python tracker

[issue22493] Deprecate the use of flags not at the start of regular expression

2016-09-16 Thread Tim Graham
Tim Graham added the comment: Yes, I found that Django needs an update to support that syntax in URLpatterns. Thanks. -- ___ Python tracker ___

[issue27806] 2.7 32-bit builds fail on future releases of OS X due to dependency on deleted header file

2016-09-16 Thread Jeremy Sequoia
Jeremy Sequoia added the comment: sys/cdefs.h (on new enough darwin) does this for such cases: #ifndef __has_include #define __has_include(x) 0 #endif but of course that isn't present in sys/cdefs.h on older SDKs, so you can just shove that above the check and it should fallback the way you

[issue24416] Return a namedtuple from date.isocalendar()

2016-09-16 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky nosy: +belopolsky versions: +Python 3.7 -Python 3.6 ___ Python tracker

[issue27806] 2.7 32-bit builds fail on future releases of OS X due to dependency on deleted header file

2016-09-16 Thread Jeremy Sequoia
Jeremy Sequoia added the comment: Thanks, yep that looks much nicer to me. Containing the core logic at a central choke point makes maintenance much easier. I'll work to get this into MacPorts. -- ___ Python tracker

How to get the source code of python function being decorated?

2016-09-16 Thread Peng Yu
Hi, See the following example, I am not able to get the source code of the actual function that does the calculation of partial_ratio. Does anybody know what is the correct way of getting the source? /tmp$ ./main.py @functools.wraps(func) def decorator(*args, **kwargs): if args[0]

Re: why this code loop forever after a draw a rectangle

2016-09-16 Thread Gary Herron
On 09/16/2016 04:24 AM, meInvent bbird wrote: im = img.copy() cntcounter = 0 for cnt in contours: epsilon = 0.1*cv2.arcLength(cnt,True) approx = cv2.approxPolyDP(cnt,epsilon,True) #peri = cv2.arcLength(cnt, True) #approx = cv2.approxPolyDP(c, 0.5 * peri,

[issue15443] datetime module has no support for nanoseconds

2016-09-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Another advantage of a single nanoseconds field is that currently microseconds are packed in 3 bytes and nanoseconds would fit in 4 - a 1 byte increase, but to add a 0-999 field, one would need at least 2 bytes. -- versions: +Python 3.7 -Python

Re: How to get the source code of python function being decorated?

2016-09-16 Thread Peter Otten
Peng Yu wrote: > Hi, See the following example, I am not able to get the source code of > the actual function that does the calculation of partial_ratio. Does > anybody know what is the correct way of getting the source? > > /tmp$ ./main.py > @functools.wraps(func) > def decorator(*args,

[issue27761] Private _nth_root function loses accuracy

2016-09-16 Thread Mark Dickinson
Mark Dickinson added the comment: Here's the error analysis, for the record. It's crude, but effective. Assume our decimal context precision is p (so p = 20 for the above code). 1. d is represented exactly with value in [1.0, 2.0). (Conversions from float to Decimal are exact.) 2. c.ln(d)

Re: how to automate java application in window using python

2016-09-16 Thread vern . muhr
On Thursday, September 15, 2016 at 11:57:04 PM UTC-7, meInvent bbird wrote: > On Friday, September 16, 2016 at 2:26:47 AM UTC+8, bream...@gmail.com wrote: > > On Thursday, September 15, 2016 at 8:13:05 AM UTC+1, meInvent bbird wrote: > > > how to automate java application in window using python >

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

2016-09-16 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, maybe the list should just removed and only the link to the wiki preserved? Agreed that the list here feels outdated. And updating it is always going to be a political game (e.g. why isn't Wing IDE listed?) -- nosy: +gvanrossum

[issue27761] Private _nth_root function loses accuracy

2016-09-16 Thread Tim Peters
Tim Peters added the comment: Mark, the code I showed in roots.py is somewhat more accurate and highly significantly faster than the code you just posted. It's not complicated at all: it just uses Decimal to do a single Newton correction with extended precision. Since it doesn't use the

How to install Python.h on FreeBSD 10.0-RELEASE?

2016-09-16 Thread Don Kuenz
The installed python packages are shown below. Searches lead me to believe that a PTH option make play a role. $ uname -v FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014

[issue28179] Segfault in test_recursionlimit_fatalerror

2016-09-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +ned.deily priority: normal -> release blocker ___ Python tracker ___

Re: why this code loop forever after a draw a rectangle

2016-09-16 Thread MRAB
On 2016-09-16 20:14, Gary Herron wrote: On 09/16/2016 04:24 AM, meInvent bbird wrote: im = img.copy() cntcounter = 0 for cnt in contours: epsilon = 0.1*cv2.arcLength(cnt,True) approx = cv2.approxPolyDP(cnt,epsilon,True) #peri = cv2.arcLength(cnt, True)

[issue27806] 2.7 32-bit builds fail on future releases of OS X due to dependency on deleted header file

2016-09-16 Thread Ned Deily
Ned Deily added the comment: sashk, thanks for the patches! The general approach LGTM as well. Unfortunately, we need the fix to work with gcc-4.2 since the Python 2.7 installers are still built and supported on OS X 10.5 and 10.6 and the __has_include preprocessor construct is not

[issue28184] Trailing whitespace in C source code

2016-09-16 Thread Francisco Couzo
New submission from Francisco Couzo: As per Terry's recommendations (#28145), I'm going to open a new issue for each case. -- files: trailing_whitespace.patch keywords: patch messages: 276761 nosy: franciscouzo, josh.r, mark.dickinson, martin.panter, r.david.murray, terry.reedy

Re: how to automate java application in window using python

2016-09-16 Thread Lawrence D’Oliveiro
On Friday, September 16, 2016 at 10:22:34 PM UTC+12, Christian Gollwitzer wrote: > "How do I automate a Java application using Python?" Which is really a meaningless question. “Automation” is what computer programs do. (Assuming “application” is just another word for “program”.) If the program

Re: Where is the documentation for ','?

2016-09-16 Thread MRAB
On 2016-09-17 03:05, Peng Yu wrote: Hi, I'm wondering where is the documentation for ',' as in the following usage. x = 1 y = 2 x, y = y, x I tried help(','). But there are too many ',' in it and I don't see in which section ',' is documented. Could anybody let me know? Thanks. Search for

Is there something similar to `set -v` of bash in python

2016-09-16 Thread Peng Yu
Hi, `set -v` in bash allows the print of the command before print the output of the command. I want to do the similar thing --- print a python command and then print the output of the command. Is it possible with python? -- Regards, Peng -- https://mail.python.org/mailman/listinfo/python-list

[issue28168] Use _winapi.WaitForMultipleObjects in Popen.wait()

2016-09-16 Thread STINNER Victor
STINNER Victor added the comment: > I decided to make it an error to pass an empty sequence It makes sense since the original WaitForMultipleObjects() also requires at least one object: https://msdn.microsoft.com/en-us/library/windows/desktop/ms687025(v=vs.85).aspx nCount [in] The

[issue28168] Use _winapi.WaitForMultipleObjects in Popen.wait()

2016-09-16 Thread STINNER Victor
STINNER Victor added the comment: Oh nice, you implemented the PEP 475 for _winapi.WaitForMultipleObjects()! I missed this function when implementing this PEP :-) -- nosy: +haypo ___ Python tracker

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

2016-09-16 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Hmm.. not sure if I did this correctly. I uploaded another patch file, is this right? Or, how can I edit my original patch? Thanks. -- ___ Python tracker

[issue27806] 2.7 32-bit builds fail on macOS 10.12 Sierra due to dependency on deleted header file QuickTime/QuickTime.h

2016-09-16 Thread Ned Deily
Ned Deily added the comment: Thanks, Alexander and especially Jeremy, for the reviews and suggestions. Thanks again sashk for the patches. Committed for release in 2.7.13. -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed title: 2.7 32-bit builds fail on

[issue22493] Deprecate the use of flags not at the start of regular expression

2016-09-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch LGTM (but I changed tests a little). Thanks Tim! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue27806] 2.7 32-bit builds fail on future releases of OS X due to dependency on deleted header file

2016-09-16 Thread sashk
sashk added the comment: Ned, please see attached third version of the patch with workaround suggested by Jeremy for older versions of OS X. -- Added file: http://bugs.python.org/file44699/issue27806_v3.patch ___ Python tracker

Re: why this code loop forever after a draw a rectangle

2016-09-16 Thread meInvent bbird
after succeed to draw lines in graph, however, https://drive.google.com/file/d/0Bxs_ao6uuBDUWVBFZzVIVGotRlk/view?usp=sharing expected the blue line connect the bottom of red line graph https://drive.google.com/file/d/0Bxs_ao6uuBDUNGZFS2F3WnJERzA/view?usp=sharing how can convex hull be

[issue28185] Tabs in C source code

2016-09-16 Thread Francisco Couzo
New submission from Francisco Couzo: Files I didn't change: Python/dup2.c, Python/strdup.c (Since they are external dependencies) -- files: tabs_c.patch keywords: patch messages: 276762 nosy: franciscouzo, josh.r, mark.dickinson, martin.panter, r.david.murray, terry.reedy priority:

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

2016-09-16 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks for the feedback :) As suggested, I removed all other IDEs and just link to the wiki. -- Added file: http://bugs.python.org/file44705/docupdate2.patch ___ Python tracker

array.itemsize: Documentation Versus Reality

2016-09-16 Thread Lawrence D’Oliveiro
>>> a = array.array("I", (0,)) >>> a.itemsize 4 >>> a = array.array("L", (0,)) >>> a.itemsize 8 According to , the “minimum size” should be 2 and 4 respectively. It further says: The actual representation of values is

Looking for tips and gotchas for working with Python 3.5 zipapp feature

2016-09-16 Thread Malcolm Greene
Looking for tips or edge case gotchas associated with using Python 3.5's new zipapp feature. For those of you wondering what this feature is, see the end of this post for a brief background [1]. Two questions in particular: 1. Are there any issues with deploying scripts that sit in sub-

is it possible to adjust convex hull to draw blue line instead of green line?

2016-09-16 Thread meInvent bbird
i succeed to use code to draw green line, but green line not draw the large area, expect second uploaded picture, the blue line connect the bottom of red line graph im = img.copy() cntcounter = 0 for cnt in contours: #epsilon = 0.1*cv2.arcLength(cnt,True) #approx =

[issue28185] Tabs in C source code

2016-09-16 Thread Francisco Couzo
Changes by Francisco Couzo : -- versions: +Python 3.7 Added file: http://bugs.python.org/file44703/tabs_h.patch ___ Python tracker

Re: Where is the documentation for ','?

2016-09-16 Thread Lawrence D’Oliveiro
On Saturday, September 17, 2016 at 2:05:49 PM UTC+12, Peng Yu wrote: > x, y = y, x It’s just syntactic sugar for (x, y) = (y, x) -- https://mail.python.org/mailman/listinfo/python-list

Re: Where is the documentation for ','?

2016-09-16 Thread Nathan Ernst
The grammar and what it represents is defined at https://docs.python.org/3/reference/expressions.html#expression-lists Regards On Sep 16, 2016 9:59 PM, "Peng Yu" wrote: > OK. But it is documented somewhere in python doc? > > On Fri, Sep 16, 2016 at 9:48 PM, Lawrence

[issue28183] Clean up and speed up dict iteration

2016-09-16 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +methane, xiang.zhang ___ Python tracker ___

[issue22493] Deprecate the use of flags not at the start of regular expression

2016-09-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset c35a528268fd by Serhiy Storchaka in branch '3.6': Issue #22493: Warning message emitted by using inline flags in the middle of https://hg.python.org/cpython/rev/c35a528268fd New changeset 9d0f4da4d531 by Serhiy Storchaka in branch 'default': Issue

[issue28168] Use _winapi.WaitForMultipleObjects in Popen.wait()

2016-09-16 Thread Eryk Sun
Changes by Eryk Sun : Added file: http://bugs.python.org/file44698/issue_28168_03.patch ___ Python tracker ___

[issue28168] Use _winapi.WaitForMultipleObjects in Popen.wait()

2016-09-16 Thread Eryk Sun
Changes by Eryk Sun : Removed file: http://bugs.python.org/file44673/issue_28168_01.patch ___ Python tracker ___

[issue28168] Use _winapi.WaitForMultipleObjects in Popen.wait()

2016-09-16 Thread Eryk Sun
Changes by Eryk Sun : Removed file: http://bugs.python.org/file44674/issue_28168_02.patch ___ Python tracker ___

Re: why this code loop forever after a draw a rectangle

2016-09-16 Thread meInvent bbird
img is the image im is a new memory of image using img.copy() On Saturday, September 17, 2016 at 7:46:42 AM UTC+8, meInvent bbird wrote: > thank you very much, > it out of the loop now. > because drawLine function return things > > i just change drawLine to rectangle, > have not thought that

[issue28168] Use _winapi.WaitForMultipleObjects in Popen.wait()

2016-09-16 Thread Eryk Sun
Eryk Sun added the comment: Hopefully this is my last change until someone reviews this. I decided to make it an error to pass an empty sequence, which previously would implicitly wait on the SIGINT event. This way simplifies the code and prevents someone from accidentally waiting forever on

Re: is it possible to adjust convex hull to draw blue line instead of green line?

2016-09-16 Thread MRAB
On 2016-09-17 01:20, meInvent bbird wrote: i succeed to use code to draw green line, but green line not draw the large area, expect second uploaded picture, the blue line connect the bottom of red line graph [snip] Here's the code with the commented code and print statements removed and the

Where is the documentation for ','?

2016-09-16 Thread Peng Yu
Hi, I'm wondering where is the documentation for ',' as in the following usage. x = 1 y = 2 x, y = y, x I tried help(','). But there are too many ',' in it and I don't see in which section ',' is documented. Could anybody let me know? Thanks. -- Regards, Peng --

Re: Where is the documentation for ','?

2016-09-16 Thread Peng Yu
OK. But it is documented somewhere in python doc? On Fri, Sep 16, 2016 at 9:48 PM, Lawrence D’Oliveiro wrote: > On Saturday, September 17, 2016 at 2:05:49 PM UTC+12, Peng Yu wrote: >> x, y = y, x > > It’s just syntactic sugar for > > (x, y) = (y, x) > -- >

Re: is it possible to adjust convex hull to draw blue line instead of green line?

2016-09-16 Thread Steve D'Aprano
On Sat, 17 Sep 2016 10:20 am, meInvent bbird wrote: > i succeed to use code to draw green line, but green line not draw the > large area, expect second uploaded picture, the blue line connect > the bottom of red line graph Please don't waste our time with dead code that has been commented out

[issue28185] Tabs in C source code

2016-09-16 Thread Francisco Couzo
Changes by Francisco Couzo : Added file: http://bugs.python.org/file44704/tabs_h.patch ___ Python tracker ___

[issue28185] Tabs in C source code

2016-09-16 Thread Francisco Couzo
Changes by Francisco Couzo : Removed file: http://bugs.python.org/file44703/tabs_h.patch ___ Python tracker ___

Re: Where is the documentation for ','?

2016-09-16 Thread Peng Yu
help(tuple) gives me this, which does not mention ',' either. Help on class tuple in module __builtin__: class tuple(object) | tuple() -> empty tuple | tuple(iterable) -> tuple initialized from iterable's items | | If the argument is a tuple, the return value is the same object. | |

[issue27806] 2.7 32-bit builds fail on future releases of OS X due to dependency on deleted header file

2016-09-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4030300fcb18 by sashk in branch '2.7': Issue #27806: Fix 32-bit builds on macOS Sierra 10.12 broken by removal of https://hg.python.org/cpython/rev/4030300fcb18 -- nosy: +python-dev ___ Python tracker

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

2016-09-16 Thread Guido van Rossum
Guido van Rossum added the comment: You did the right thing. Check out the "review" link. -- ___ Python tracker ___

Re: Where is the documentation for ','?

2016-09-16 Thread Ben Finney
Peng Yu writes: > help(tuple) gives me this Yes. That's the API definition for the ‘tuple’ type. You were advised to search the documentation, not the interactive help. You'll find the descriptions of “tuple” and even “tuple unpacking” are what you want. -- \ “When

Re: Discover all non-standard library modules imported by a script

2016-09-16 Thread Malcolm Greene
Thanks for your suggestions Chris and Terry. The answer I was looking for is the modulefinder module which is part of the standard lib. Works like a charm! Quote: This module provides a ModuleFinder class that can be used to determine the set of modules imported by a script. modulefinder.py can

Re: why this code loop forever after a draw a rectangle

2016-09-16 Thread meInvent bbird
thank you very much, it out of the loop now. because drawLine function return things i just change drawLine to rectangle, have not thought that rectangle not return thing, just edit the parameter On Saturday, September 17, 2016 at 5:26:53 AM UTC+8, MRAB wrote: > On 2016-09-16 20:14, Gary

[issue28185] Tabs in C source code

2016-09-16 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

why this code loop forever after a draw a rectangle

2016-09-16 Thread meInvent bbird
im = img.copy() cntcounter = 0 for cnt in contours: epsilon = 0.1*cv2.arcLength(cnt,True) approx = cv2.approxPolyDP(cnt,epsilon,True) #peri = cv2.arcLength(cnt, True) #approx = cv2.approxPolyDP(c, 0.5 * peri, True)

Discover all non-standard library modules imported by a script

2016-09-16 Thread Malcolm Greene
Looking for suggestions on how, given a main script, discover all the non-standard library modules imported across all modules, eg. the modules that other modules import, etc. I'm not looking to discover dynamic imports or other edge cases, just the list modules loaded via "import " and "from

[issue28128] Improve the warning message for invalid escape sequences

2016-09-16 Thread Eric V. Smith
Eric V. Smith added the comment: Couldn't we create a private version of PyUnicode_DecodeUnicodeEscape, to be called by ast.c, which passes back invalid escape info? Then have the actual warning raised by ast.c, which knows enough about the context to generate a better error/warning. I think

[issue25270] codecs.escape_encode systemerror on empty byte string

2016-09-16 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the review, Serhiy. Here's an updated patch. -- Added file: http://bugs.python.org/file44691/issue25270_v3.diff ___ Python tracker

Re: why this code loop forever after a draw a rectangle

2016-09-16 Thread Joonas Liik
On 16 September 2016 at 14:24, meInvent bbird wrote: > im = img.copy() > cntcounter = 0 > for cnt in contours: > epsilon = 0.1*cv2.arcLength(cnt,True) > approx = cv2.approxPolyDP(cnt,epsilon,True) > #peri = cv2.arcLength(cnt, True) > #approx =

Re: Discover all non-standard library modules imported by a script

2016-09-16 Thread Chris Angelico
On Fri, Sep 16, 2016 at 9:29 PM, Malcolm Greene wrote: > Looking for suggestions on how, given a main script, discover all the > non-standard library modules imported across all modules, eg. the > modules that other modules import, etc. I'm not looking to discover > dynamic

Re: why this code loop forever after a draw a rectangle

2016-09-16 Thread meInvent bbird
i follow this post to give some time it to operate, wait a long time still looping http://answers.opencv.org/question/60094/libpng-warning-image-width-is-zero-in-ihdr/ i can not stand this Ninja coding life any more, i have to open my code for ask this error import cv2 import numpy as np

[issue28180] sys.getfilesystemencoding() should default to utf-8

2016-09-16 Thread Jan Niklas Hasse
Jan Niklas Hasse added the comment: Unfortunately no, as this would mean I'll have to change all my python invocations in my scripts and it wouldn't work for executable files with #!/usr/bin/env python3 would it? -- ___ Python tracker

[issue28128] Improve the warning message for invalid escape sequences

2016-09-16 Thread Eric V. Smith
Eric V. Smith added the comment: Here is an extremely rough patch that shows the basic concept. I named the private function _PyUnicode_DecodeUnicodeEscape. The problems with this patch are: 1. it always raises an error, not a warning 2. the private function isn't declared in a .h file 3. the

  1   2   >