unorderable types: list() > int()

2017-10-12 Thread Andrew Z
Hello, pos = {"CLown":10,"BArbie":20} I want to return integer (10) for the keyword that starts with "CL" cl_ = [v for k, v in pos.items() if k.startswith('CL')] cl_pos = cl_[0] if cl_pos > 0: blah.. There are 2 issues with the above: a. ugly - cl_pos = cl_ [0] . I was thinking something

[issue31509] test_subprocess hangs randomly on AMD64 Windows10 3.x

2017-10-12 Thread Ned Deily
Ned Deily added the comment: I also have seen test_subprocess hangs on both macOS and on Debian Linux on both 3.6 and master, as recently as 3.6.3 and 3.7.0a1 but not with current heads. After some experimenting and bisecting, I tracked the fix down to the mock os.waitpid

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Gregory Ewing
Grant Edwards wrote: It sure was an education the first I wrote C code for a machine where 1 == sizeof char == sizeof int == sizeof long == sizeof float == sizeof double All were 32 bits. Unicode-ready -- way ahead of its time! -- Greg --

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Chris Angelico
On Fri, Oct 13, 2017 at 4:16 PM, Steve D'Aprano wrote: > On Fri, 13 Oct 2017 03:37 pm, Gregory Ewing wrote: > >> If the compiler can tell where p is initially pointing, it could >> put the pointer in read-only memory. > > If it's read-only, how can the compiler write

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Gregory Ewing
Grant Edwards wrote: On 2017-10-13, Stefan Ram wrote: 1 byte addressable unit of data storage large enough to hold any member of the basic character set of the execution environment« ISO C standard Hmmm. So an architecture with memory

Running flask on AWS SAM

2017-10-12 Thread Frustrated learner
Hello, I have a flask based application which i am able to run locally. $ python swagger_server/app.py * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit) I am trying to port this over to aws. I have all the dependencies and code organized in the same folder. Here is the transaction

[issue30632] IDLE: add unittests to test_autocomplete

2017-10-12 Thread Berker Peksag
Change by Berker Peksag : -- superseder: -> IDLE: Add test_autocomplete unittest ___ Python tracker ___

[issue31772] SourceLoader uses stale bytecode in case of equal mtime seconds

2017-10-12 Thread Nick Coghlan
Nick Coghlan added the comment: Increasing the number of stat calls required for a successful import is a good reason to close the submitted PR, but I'm not sure it's a good reason to close the *issue*, as there may be other ways to solve it that don't result in an extra

[issue30744] Local variable assignment is broken when combined with threads + tracing + closures

2017-10-12 Thread Nick Coghlan
Nick Coghlan added the comment: Aye, what's in PEP 558 is the least invasive implementation change I've been able to come up that fixes the reported bug, but Nathaniel's right that it would break debuggers (and probably some other things) as currently written. So the

[issue31732] Add TRACE level to the logging module

2017-10-12 Thread pmpp
pmpp added the comment: Sorry, i didn't mean to be rude. Just wanted to pick your attention because i think you miss the point: logging as is it with its levels is perfect for *log messages*. Review the typical usage shown and you'll see that tracing level is for logging

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Steve D'Aprano
On Fri, 13 Oct 2017 03:37 pm, Gregory Ewing wrote: > If the compiler can tell where p is initially pointing, it could > put the pointer in read-only memory. If it's read-only, how can the compiler write to it? (I come from the days when ROM was actual ROM, burned in at the factory.) --

[issue31742] Default to emitting FutureWarning for provisional APIs

2017-10-12 Thread Nick Coghlan
Nick Coghlan added the comment: Keep in mind that I'm not proposing that we retroactively change our approach to managing any currently provisional APIs that were proposed and implemented under the current version of PEP 411. Instead I'm merely suggesting that the policy

[issue31732] Add TRACE level to the logging module

2017-10-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: No need to be brusque with me. Vinay is the decision maker on this. Overall, this seems rehash and second guess the discussions and decisions made 15 years ago when PEP 282 was accepted. At that time, it was decided that five

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Gregory Ewing
bartc wrote: (2) Declare data to be put into read-only memory as you say. That's fine with a 'const int * p', but what about a 'int * const p'? If the compiler can tell where p is initially pointing, it could put the pointer in read-only memory. Probably unlikely to happen in real code,

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Gregory Ewing
Stefan Ram wrote: void i_know_i_was_passed_a_pointer_to_an_array_and_how_many_elements_are_in_it ( char( *a )[ 4 ] ) { for( int i = 0; i < 4; ++i ) putchar( ( *a )[ i ]); } Only because you've statically made the array size part of the type. Your original example didn't do that; presumably

Re: unorderable types: list() > int()

2017-10-12 Thread Steve D'Aprano
On Fri, 13 Oct 2017 03:23 pm, Andrew Z wrote: > Hello, > pos = {"CLown":10,"BArbie":20} > I want to return integer (10) for the keyword that starts with "CL" > > > cl_ = [v for k, v in pos.items() if k.startswith('CL')] > cl_pos = cl_[0] > if cl_pos > 0: > >blah.. > > > There are 2

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Chris Angelico
On Fri, Oct 13, 2017 at 4:28 PM, Gregory Ewing wrote: > Grant Edwards wrote: >> >> On 2017-10-13, Stefan Ram wrote: >> >>> 1 byte >>> >>> addressable unit of data storage large enough to hold >>> any member of the basic

Re: OT: MPC-HC project ending? [Re: Lies in education [was Re: The "loop and a half"]]

2017-10-12 Thread breamoreboy
On Thursday, October 12, 2017 at 12:33:09 PM UTC+1, Chris Angelico wrote: > On Thu, Oct 12, 2017 at 8:12 PM, Thomas Jollans wrote: > > On 2017-10-12 02:51, Chris Angelico wrote: > >> If it wants new life, it's probably going to need a Linux version, > >> because that's where a lot of developers

ANN: psutil 5.4.0 with AIX support is out

2017-10-12 Thread Giampaolo Rodola'
Hello all, I'm glad to announce the release of psutil 5.4.0: https://github.com/giampaolo/psutil A detailed blog post is available here: http://grodola.blogspot.com/2017/10/psutil-540-with-aix-support-is-out.html About = psutil (process and system utilities) is a cross-platform library for

[issue28647] python --help: -u is misdocumented as binary mode

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The -u option doesn't affect the buffering of stdin. Is it worth to document this explicitly? Or it just adds a noise? Maybe remove this from the help and manpage but add in the RST documentation? --

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Bill
Marko Rauhamaa wrote: Grant Edwards : I like [const qualifiers] in C because it allows the linker to place them in ROM with the code. It also _sometimes_ provides useful diagnostics when you pass a pointer to something which shouldn't be modified to something that is

[issue28647] python --help: -u is misdocumented as binary mode

2017-10-12 Thread Berker Peksag
Berker Peksag added the comment: I think it's better to be explicit and mention 'stdin' in this case. Plus, "stdin is always buffered" is quite short so potential of creating noise is quite minimal IMO. (FYI, I asked this question on GitHub:

[issue31753] Unnecessary closure in ast.literal_eval

2017-10-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: I prefer the existing code and think this shouldn't be changed. -- nosy: +rhettinger ___ Python tracker

Re: Logging from files doesn't work

2017-10-12 Thread Peter Otten
Andrew Z wrote: > Hello, > > apparently my reading comprehension is nose diving these days. After > reading python cookbook and a few other tutorials i still can't get a > simple logging from a few files to work. > I suspected my file organization - all files are in the same directory, >

[issue31761] regrtest: faulthandler.enable() fails with io.UnsupportedOperation: fileno when run from IDLE

2017-10-12 Thread STINNER Victor
STINNER Victor added the comment: > "If you don’t have easy access to a command line, you can run the test suite > from a Python or IDLE shell: The devguide is wrong. You should not run the Python test suite in IDLE. It doesn't work and many tests fail just because

[issue31732] Add TRACE level to the logging module

2017-10-12 Thread STINNER Victor
STINNER Victor added the comment: Raymond Hettinger: "... the need for finer distinctions almost never arises in practice" I gave a list of 10 projects which are alreading using widely the 6th TRACE level. In this list, I consider that OpenStack and SaltStack are

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Chris Angelico
On Thu, Oct 12, 2017 at 6:22 PM, Marko Rauhamaa wrote: > Grant Edwards : > >> I like [const qualifiers] in C because it allows the linker to place >> them in ROM with the code. It also _sometimes_ provides useful >> diagnostics when you pass a pointer

Re: Want to write a python code for sending and receiving frames over wifi/wlan0 using python

2017-10-12 Thread Chris Angelico
On Thu, Oct 12, 2017 at 7:08 PM, T Obulesu wrote: > Hello all, I want to send some frames defined by me{Example, > [0x45,0x43,0x32]} to the raspberry pi from any macine(Desktop/Laptop/other > raspberry pi). But I want to send those frames over wifi or use wlan0 using >

[issue31770] crash and refleaks when calling sqlite3.Cursor.__init__() more than once

2017-10-12 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

Re: OT: MPC-HC project ending? [Re: Lies in education [was Re: The "loop and a half"]]

2017-10-12 Thread Thomas Jollans
On 2017-10-12 02:51, Chris Angelico wrote: > If it wants new life, it's probably going to need a Linux version, > because that's where a lot of developers hang out. The reality is that > open source developers are much more likely to develop on Linux than > on Windows; you can maintain a Windows

[issue31761] regrtest: faulthandler.enable() fails with io.UnsupportedOperation: fileno when run from IDLE

2017-10-12 Thread STINNER Victor
Change by STINNER Victor : -- components: +Tests -Documentation title: Possible error in devguide part about tests -> regrtest: faulthandler.enable() fails with io.UnsupportedOperation: fileno when run from IDLE ___ Python

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Marko Rauhamaa
Chris Angelico : > On Thu, Oct 12, 2017 at 6:22 PM, Marko Rauhamaa wrote: >> Additionally, you can launder any constant string into a nonconstant >> string with strstr(3): >> >> const char *cs = "hello"; >> char *s = strstr(cs, ""); >> s[0] = 'y';

EuroPython 2017: Videos for Tuesday available online

2017-10-12 Thread M.-A. Lemburg
We are pleased to announce the second batch of cut videos for EuroPython 2017. To see the new videos, please head over to our EuroPython YouTube channel and select the "EuroPython 2017" playlist. The new videos start at entry 31 in the playlist. * EuroPython 2017 Videos *

how to replace maltipal char from string and substitute new char

2017-10-12 Thread Iranna Mathapati
Hi Team, How to replace multipal char from string and substitute with new char with one line code Ex: str = "9.0(3)X7(2) " ===> 9.0.3.X7.2 need to replace occurrence of '(',')' with dot(.) chars output: 9.0.3.X7.2 Thanks, -- https://mail.python.org/mailman/listinfo/python-list

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Thomas Jollans
On 2017-10-12 07:31, Chris Angelico wrote: > On Thu, Oct 12, 2017 at 12:19 PM, Ben Bacarisse wrote: >> Provided some early part of the URL is handled by PHP, the rest of the >> URL path is provided to PHP in $_SERVER["PATH_INFO"]. > > Is it possible to do that without

[issue13802] IDLE font settings: use multiple character sets in examples

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think empty lines and headers are not needed. They just increase the size of the dialog window, it may be too large for low resolution screens. The standard font chooser on Windows uses the following sets for Unicode-aware

[issue13802] IDLE font settings: use multiple character sets in examples

2017-10-12 Thread Louie Lu
Louie Lu added the comment: PR 3960 display on my Linux works well, and the combination of the Chinese characters has no political controversial. But it is lack of simplify characters, the only one is '汉', others are all traditional characters (or they are same in simp. and

[issue30767] logging must check exc_info correctly

2017-10-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: I agree that this should be closed. -- nosy: +rhettinger stage: patch review -> resolved status: pending -> closed ___ Python tracker

Re: Want to write a python code for sending and receiving frames over wifi/wlan0 using python

2017-10-12 Thread Tim Golden
On 12/10/2017 09:08, T Obulesu wrote: Hello all, I want to send some frames defined by me{Example, [0x45,0x43,0x32]} to the raspberry pi from any macine(Desktop/Laptop/other raspberry pi). But I want to send those frames over wifi or use wlan0 using python Any suggestions? Are you talking

[issue31753] Unnecessary closure in ast.literal_eval

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I prefer the existing code too. But I'm surprised that this change has a measurable effects at all. I thought that creating a closure is cheaper. Of course it is much faster than creating a class. Maybe it is worth to spend

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Thomas Jollans
On 2017-10-12 01:32, Christopher Reimer wrote: > On Oct 11, 2017, at 9:07 AM, Bill wrote: >> >> Grant Edwards wrote: >>> On 2017-10-11, Bill wrote: >>> >>> [...] I'm not here to "cast stones", I like Python. I just think that you

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Marko Rauhamaa
Bill : > Marko Rauhamaa wrote: >> One example is the surprising fact that string literals in C are >> "char *" and not "const char *". > > If not, you couldn't pass a string literal to a function having > prototype void f(char *s); That *ought* to be prevented. That's

PyCA cryptography 2.1.1 released

2017-10-12 Thread Paul Kehrer
PyCA cryptography 2.1.1 has been released to PyPI. cryptography includes both high level recipes and low level interfaces to common cryptographic algorithms such as symmetric ciphers, message digests, and key derivation functions. We support Python 2.6-2.7, Python 3.4+, and PyPy. This release, in

[issue13802] IDLE font settings: use multiple character sets in examples

2017-10-12 Thread Dong-hee Na
Dong-hee Na added the comment: '가냐더려모뵤수유즈치캐턔페혜' is better than '가나다라마바사아차카파타하' -- ___ Python tracker ___

[issue25588] Run test suite from IDLE idlelib.run subprocess

2017-10-12 Thread STINNER Victor
STINNER Victor added the comment: I proposed PR 3962 to fix a few issues in regrtest when sys.stdout and sys.stderr have to file descriptor. I'm not sure that we should promote running tests with unusual sys.stdout and sys.stderr, since many tests fail in that case.

[issue31732] Add TRACE level to the logging module

2017-10-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: I vote against this on the ground that five levels have sufficed for a long and that the need for finer distinctions almost never arises in practice. There would be an ongoing mental cost to making users learn and think about

Want to write a python code for sending and receiving frames over wifi/wlan0 using python

2017-10-12 Thread T Obulesu
Hello all, I want to send some frames defined by me{Example, [0x45,0x43,0x32]} to the raspberry pi from any macine(Desktop/Laptop/other raspberry pi). But I want to send those frames over wifi or use wlan0 using python Any suggestions? -- https://mail.python.org/mailman/listinfo/python-list

[issue13802] IDLE font settings: use multiple character sets in examples

2017-10-12 Thread Dong-hee Na
Dong-hee Na added the comment: Louie Lu Thanks for the cc. In Korea, 'ᅡᅦᅩᆨᆫ가결걵곴극' are not recommended characters sequence. This sequence is not fully cover Korean characters. FYI, MS Windows default font preview sequence is '다람쥐 헌 쳇바퀴에 타고파' Google chrome preview

qutebrowser v1.0.0 released!

2017-10-12 Thread Florian Bruhin
Hey, I'm delighted to announce that I just released qutebrowser v1.0.0! qutebrowser is a keyboard driven browser with a vim-like, minimalistic interface. It's written using PyQt and cross-platform. This release comes with many big breaking changes such as the new config and QtWebEngine by

[issue31769] configure includes user CFLAGS when detecting pthreads support

2017-10-12 Thread Chi Hsuan Yen
Change by Chi Hsuan Yen : -- nosy: +Chi Hsuan Yen ___ Python tracker ___ ___

[issue31741] backports import path can not be overridden in Windows (Linux works fine)

2017-10-12 Thread Paul Moore
Paul Moore added the comment: Also, one of the packages installed creates a file configparser-3.5.0-py2.7-nspkg.pth This has some very suspicious looking content: import sys, types, os;has_mfs = sys.version_info > (3, 5);p =

[issue31763] Add NOTICE level to the logging module

2017-10-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: As mentioned in the other tracker item, I'm against adding another level. While it might serve an exotic need, I think most users would be worse off having to learn and think about yet another level of distinction. The mental

[issue13802] IDLE font settings: use multiple character sets in examples

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I suggest to make the sample text editable: self.font_sample = Text(frame_sample, font=temp_font, width=20) self.font_sample.insert(END, sample) This will allow a user to test fonts in any perspective. --

[issue31770] crash and refleaks when calling sqlite3.Cursor.__init__() more than once

2017-10-12 Thread Oren Milman
New submission from Oren Milman : The following code crashes: import sqlite3 import weakref def callback(*args): pass connection = sqlite3.connect(":memory:") cursor = sqlite3.Cursor(connection) ref = weakref.ref(cursor, callback) cursor.__init__(connection) del cursor del

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Christian Gollwitzer
Am 12.10.17 um 01:15 schrieb Stefan Ram: Define a function »g« with a parameter »x« of type »int«, so that this function »g« returns a pointer to another function. This other function has a parameter of type »char« and returns a double value. Ok /Without/ a typedef. And WHY

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Thomas Jollans
On 2017-10-12 01:33, Chris Angelico wrote: > Have you seen a city that grew one house at a time, and had > streets added to service those houses? Not good. Actually, that's more or less how most cities grew historically. Nowadays these organically grown city centres tend to be much more

[issue25588] Run test suite from IDLE idlelib.run subprocess

2017-10-12 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +3940 stage: needs patch -> patch review ___ Python tracker ___

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread bartc
On 12/10/2017 09:23, Christian Gollwitzer wrote: Am 12.10.17 um 01:15 schrieb Stefan Ram:    Define a function »g« with a parameter »x« of type »int«, so    that this function »g« returns a pointer to another function.    This other function has a parameter of type »char« and returns    a

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread bartc
On 12/10/2017 06:39, Grant Edwards wrote: On 2017-10-11, Gregory Ewing wrote: Neil Cerutti wrote: I dig const qualifiers, even though I'm comletely fine with their absence from Python. Out of curiosity, do you have any insights into why you like them in C++, if

[issue28647] python --help: -u is misdocumented as binary mode

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In Python 2 there is an internal buffering in xreadlines(), readlines() and file-object iterators. You need to enter many lines first that the program get the first of them. And -u doesn't help. But in Python 3 the program gets

Why the CLI hang using pyjwt ?

2017-10-12 Thread will
Not sure why the CLI command "pyjwt decode --no-verify ..." will hang at sys.stdin.read() even though I provided all the input. Any ideas on how to work around the problem? $ pyjwt -v pyjwt 1.5.3 $ pyjwt decode --no-verify

Re: OT: MPC-HC project ending? [Re: Lies in education [was Re: The "loop and a half"]]

2017-10-12 Thread Chris Angelico
On Thu, Oct 12, 2017 at 8:12 PM, Thomas Jollans wrote: > On 2017-10-12 02:51, Chris Angelico wrote: >> If it wants new life, it's probably going to need a Linux version, >> because that's where a lot of developers hang out. The reality is that >> open source developers are much more

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Steve D'Aprano
On Thu, 12 Oct 2017 04:41 pm, Grant Edwards wrote: >> Even two >> different C compilers could return different values. > > Nope. If sizeof char is not 1, then it's not C. Today I Learned. Thank you to everyone who corrected me, even the person who said I was not educated. -- Steve

Re: how to replace maltipal char from string and substitute new char

2017-10-12 Thread breamoreboy
On Thursday, October 12, 2017 at 10:46:03 AM UTC+1, Iranna Mathapati wrote: > Hi Team, > > > How to replace multipal char from string and substitute with new char with > one line code > > Ex: > > str = "9.0(3)X7(2) " ===> 9.0.3.X7.2 > > need to replace occurrence of '(',')' with

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread bartc
On 12/10/2017 11:39, Stefan Ram wrote: bartc writes: (1) Define named constants; except (in C) they can't be used like constant expressions, you can take their addresses, and accidentally or maliciously change their values. When I think of »const«, I do not think of ROM.

[issue25588] Run test suite from IDLE idlelib.run subprocess

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it would be nice to make testing so flexible as possible. This would help to get rid of unintended assumptions. If some tests are failed on IDLE I would prefer to fix or skip only these tests. --

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Ben Bacarisse
Chris Angelico writes: > On Thu, Oct 12, 2017 at 12:19 PM, Ben Bacarisse wrote: >> Chris Angelico writes: >> >>> On Thu, Oct 12, 2017 at 11:55 AM, Ben Bacarisse >>> wrote: Chris Angelico

FW: Printing to a file and a terminal at the same time

2017-10-12 Thread Lie Ryan
It wouldn't be too difficult to write a file object wrapper that emulates tee, for instance (untested): class tee(object): def __init__(self, file_objs, autoflush=True): self._files = file_objs self._autoflush = autoflush def write(self, buf): for f in

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Chris Angelico
On Thu, Oct 12, 2017 at 8:20 PM, Marko Rauhamaa wrote: > Chris Angelico : > >> On Thu, Oct 12, 2017 at 6:22 PM, Marko Rauhamaa wrote: >>> Additionally, you can launder any constant string into a nonconstant >>> string with strstr(3): >>> >>>

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Chris Angelico
On Thu, Oct 12, 2017 at 7:32 PM, Thomas Jollans wrote: > On 2017-10-12 07:31, Chris Angelico wrote: >> On Thu, Oct 12, 2017 at 12:19 PM, Ben Bacarisse wrote: >>> Provided some early part of the URL is handled by PHP, the rest of the >>> URL path is provided to

[issue31732] Add TRACE level to the logging module

2017-10-12 Thread pmpp
pmpp added the comment: As a dumb user I vote in favor of this on the ground that five levels is not sufficient for a long and that the need for finer distinctions already arose for me in practice. Till i overcame the mental cost to think, learn and *find time* on how to

Re: Want to write a python code for sending and receiving frames over wifi/wlan0 using python

2017-10-12 Thread T Obulesu
On Thursday, 12 October 2017 13:38:55 UTC+5:30, T Obulesu wrote: > Hello all, I want to send some frames defined by me{Example, > [0x45,0x43,0x32]} to the raspberry pi from any macine(Desktop/Laptop/other > raspberry pi). But I want to send those frames over wifi or use wlan0 using > python

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Marko Rauhamaa
Chris Angelico : > On Thu, Oct 12, 2017 at 8:20 PM, Marko Rauhamaa wrote: >> BTW, C++ tries to be a bit stricter about "const". It declares two >> separate prototypes: >> >>const char *strstr(const char *, const char *); >>char *strstr(char *, const

[issue25588] Run test suite from IDLE idlelib.run subprocess

2017-10-12 Thread STINNER Victor
STINNER Victor added the comment: Serhiy: "If some tests are failed on IDLE I would prefer to fix or skip only these tests." Ok, go ahead. There are many failing tests :-) -- ___ Python tracker

[issue28647] python --help: -u is misdocumented as binary mode

2017-10-12 Thread STINNER Victor
STINNER Victor added the comment: Serhiy: "(...) I think it is more correct to say that stdin is always unbuffered in Python 3." I disagree. Technically, sys.stdin.read(1) reads up to 1024 bytes from the file descriptor 0. For me, "unbuffered read" means that

[issue31771] tkinter geometry string +- when window ovelaps left or top of screen

2017-10-12 Thread Peter J
New submission from Peter J : the root.geometry() top-level window method returns strings like "212x128+-9+-8" when the window is located in the top left corner. The documentation only describes geometry strings containing + or - location coordinates. If this is

[issue30767] logging must check exc_info correctly

2017-10-12 Thread Matthew Patton
Matthew Patton added the comment: "exc_info which, if it does not evaluate as false", so we provide '1' or 'True'. The IF passes and immediately the formatter tries to dereference it blindly assuming it's Tuple and throws an Exception. Either the Formatter needs to guard

[issue31771] tkinter geometry string +- when window ovelaps left or top of screen

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Tkinter is just a wrapper around the Tk library. It returns what Tk returns. See Tk documentation: https://www.tcl.tk/man/tcl8.6/TkCmd/winfo.htm#M15 https://www.tcl.tk/man/tcl8.6/TkCmd/wm.htm#M42 If you want to improve Tkinter

[issue30767] logging must check exc_info correctly

2017-10-12 Thread Matthew Patton
Matthew Patton added the comment: Additionally (probably should have separate PR) the _checkLevel was full of holes. First, it's allowing any Integer which if you're claiming to "check" things is rather silly. At least bounds-check it to GE to NOTSET and LE to CRITICAL (or

[issue31772] SourceLoader uses stale bytecode in case of equal mtime seconds

2017-10-12 Thread Devin Bayer
New submission from Devin Bayer : The current import machinery will use stale cached bytecode if the source is modified more than once per second and with equal size. A straightforward fix is to require the bytecode mtime to be greater than the source file mtime. In the

[issue28647] python --help: -u is misdocumented as binary mode

2017-10-12 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka: https://github.com/python/cpython/pull/3961#issuecomment-336136160 "I suggest to continue the discussion on the tracker." Ok, let's continue here. "We are fixing the outdated documentation inherited from Python 2.

[issue31772] SourceLoader uses stale bytecode in case of equal mtime seconds

2017-10-12 Thread Devin Bayer
Change by Devin Bayer : -- keywords: +patch pull_requests: +3941 stage: -> patch review ___ Python tracker ___

[issue30767] logging must check exc_info correctly

2017-10-12 Thread Matthew Patton
Matthew Patton added the comment: And the reason to stomp on the "Level " is because by not doing so the message that is a single field (regex/awk) has been converted non-deterministically into two. This is very bad behavior. If emitting the string/int as-is looks wrong

[issue31773] Rewrite _PyTime_GetWinPerfCounter() for _PyTime_t

2017-10-12 Thread STINNER Victor
New submission from STINNER Victor : The commit a997c7b434631f51e00191acea2ba6097691e859 of bpo-31415 moved the implementation of time.perf_counter() from Modules/timemodule.c to Python/pytime.c. The change not only moved the code, but also changed the internal type

[issue28647] python --help: -u is misdocumented as binary mode

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: stdin is mentioned in the documentation of the -u option only due to weird internal buffering in Python 2, because user can expect that -u disables it. It is documented what methods use internal buffering and how get rid of it.

[issue31774] tarfile.open ignores custom bufsize value when creating a new archive

2017-10-12 Thread Charalampos Stratakis
New submission from Charalampos Stratakis : Trying to create an archive with the tarfile module, by specifying a different blocking factor, doesn't seem to work as only the default value is being used. The issue is reproducible on all the active python branches. Attaching

[issue28647] python --help: -u is misdocumented as binary mode

2017-10-12 Thread Berker Peksag
Berker Peksag added the comment: > -u doesn't affect stdin buffering, whatever that would mean. I think we need to document behavior of stdin somewhere, because current the sys.stdin documentation states: > When interactive, standard streams are line-buffered.

[issue31773] Rewrite _PyTime_GetWinPerfCounter() for _PyTime_t

2017-10-12 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +3943 stage: -> patch review ___ Python tracker ___

[issue31490] assertion failure in ctypes in case an _anonymous_ attr appears outside _fields_

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset fb3bb8d5d5d70acaaa0fdec15c137544fdd4463f by Serhiy Storchaka (Oren Milman) in branch '2.7': [2.7] bpo-31490: Fix an assertion failure in ctypes in case an _anonymous_ attr is defined only outside _fields_.

[issue31567] Inconsistent documentation around decorators

2017-10-12 Thread Éric Araujo
Éric Araujo added the comment: New changeset 0e61e67a57deb4abc677808201d7cf3c38138e02 by Éric Araujo (Daisuke Miyakawa) in branch 'master': bpo-31567: add or fix decorator markup in docs (#3959)

[issue31567] Inconsistent documentation around decorators

2017-10-12 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +3944 ___ Python tracker ___

[issue31761] regrtest: faulthandler.enable() fails with io.UnsupportedOperation: fileno when run from IDLE

2017-10-12 Thread Denis Osipov
Denis Osipov added the comment: Got it. Thank you for your help. -- ___ Python tracker ___

[issue31567] Inconsistent documentation around decorators

2017-10-12 Thread Berker Peksag
Berker Peksag added the comment: Use of classmethod and staticmethod decorators as functions is still a valid use case. I think the old signatures should be kept. It should be possible to document both uses in same place: .. function:: classmethod(function)

[issue24084] pstats: sub-millisecond display

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Victor. This change likely breaks graphical viewers of pstat data. How gprof and similar tools solve the problem of outputting sub-microsecond timings? -- nosy: +serhiy.storchaka

[issue24084] pstats: sub-millisecond display

2017-10-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- Removed message: https://bugs.python.org/msg304247 ___ Python tracker ___

[issue24084] pstats: sub-millisecond display

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Victor. This change likely breaks graphical viewers of pstat data. How gprof and similar tools solve the problem of outputting sub-millisecond timings? -- ___ Python

[issue24084] pstats: sub-millisecond display

2017-10-12 Thread STINNER Victor
STINNER Victor added the comment: > I concur with Victor. This change likely breaks graphical viewers of pstat > data. I propose to *do* break the format by always displaying percall timings with a precision of 6 digits. --

[issue31490] assertion failure in ctypes in case an _anonymous_ attr appears outside _fields_

2017-10-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue28647] python --help: -u is misdocumented as binary mode

2017-10-12 Thread STINNER Victor
STINNER Victor added the comment: Interesting comment in create_stdio() of Python/pylifecycle.c: --- /* stdin is always opened in buffered mode, first because it shouldn't make a difference in common use cases, second because TextIOWrapper depends on

[issue31775] Support unbuffered TextIOWrapper

2017-10-12 Thread STINNER Victor
New submission from STINNER Victor : It seems like that some methods of the io.TextIOWrapper class requires that its buffer object has the read1() method, whereas the constructor checks if the buffer has a read1() method and the TextIOWrapper _read_chunk() method is

  1   2   3   >