Re: Why doesn't Python include non-blocking keyboard input function?

2016-10-26 Thread Marko Rauhamaa
Terry Reedy : > On 10/26/2016 8:33 AM, Marko Rauhamaa wrote: >> Maybe there should be some way to get the raw events from the PTY. > > PTY? Must be Linux-specific. Most beginners are not on Linux. A PTY is an emulated console (https://en.wikipedia.org/wiki/Pseudoterminal>). I

Re: Why doesn't Python include non-blocking keyboard input function?

2016-10-26 Thread Grant Edwards
On 2016-10-27, Paul Rubin wrote: > Terry Reedy writes: > >> Today, ethernet-connected *nix servers have no keyboard, mouse, or >> even a directly connected terminal. > > Usually you ssh into them and connect to a pty which supports the > same ioctls

Re: Why doesn't Python include non-blocking keyboard input function?

2016-10-26 Thread Paul Rubin
Terry Reedy writes: > Today, ethernet-connected *nix servers have no > keyboard, mouse, or even a directly connected terminal. Usually you ssh into them and connect to a pty which supports the same ioctls that a real terminal would. I use screen editors over ssh all the time,

[issue25660] tabs don't work correctly in python repl

2016-10-26 Thread Clément
Clément added the comment: Could this commit be the reason why the attached code behaves differently in 2.7 and 3.5.2? This is the code used by Emacs' default Python mode to do completion; with it (python -i completion.py), pressing "tab" on a plain prompt offers candidates in Python 2.7, but

Re: Why doesn't Python include non-blocking keyboard input function?

2016-10-26 Thread eryk sun
On Wed, Oct 26, 2016 at 11:39 AM, Dennis Lee Bieber wrote: > Curses tends to not be available on Windows as M$ hasn't implemented a > compatible console driver. The PDCurses library supports the Windows console. Christoph Gohlke distributes a curses extension module

[issue28539] httplib/http.client HTTPConnection._set_hostport() regression

2016-10-26 Thread Charles Stephens
Charles Stephens added the comment: Yes, I'm working on patching urllib3 to preprocess the host argument to HTTPConnection. However, it makes sense to strip square brackets regardless. -- ___ Python tracker

[issue28539] httplib/http.client HTTPConnection._set_hostport() regression

2016-10-26 Thread Charles Stephens
Charles Stephens added the comment: Not when passing it to getaddrinfo(). -- ___ Python tracker ___ ___

[issue28541] Improve test coverage for json library - loading bytes

2016-10-26 Thread Zachary Ware
Changes by Zachary Ware : -- nosy: +ezio.melotti, rhettinger, zach.ware stage: -> patch review type: -> enhancement versions: +Python 3.7 ___ Python tracker

[issue28539] httplib/http.client HTTPConnection._set_hostport() regression

2016-10-26 Thread Zachary Ware
Zachary Ware added the comment: That looks like a bug in urllib3 to me. The host is *not* '[2620:125:9014:3240:14:240:128:0]', the host is '2620:125:9014:3240:14:240:128:0'; the brackets are merely for disambiguating the port. Compare to urllib.parse.urlsplit: >>> from urllib.parse import

[issue28541] Improve test coverage for json library - loading bytes

2016-10-26 Thread Eric Appelt
New submission from Eric Appelt: Increase test coverage of the json library, specifically the detect_encoding() function in the __init__ module, which is used to handle the autodetection of the encoding of a bytes object passed to json.loads(). This function was added in issue 17909 which

Re: Why doesn't Python include non-blocking keyboard input function?

2016-10-26 Thread Terry Reedy
On 10/26/2016 11:00 AM, BartC wrote: On 26/10/2016 13:33, Marko Rauhamaa wrote: Say you want to implement a simple, character-based shooting game where the two guns are operated by the [Shift] keys. Unfortunately, the Unix terminal API doesn't make that possible. You need to get the keyboard

Re: Why doesn't Python include non-blocking keyboard input function?

2016-10-26 Thread BartC
On 27/10/2016 00:30, Terry Reedy wrote: On 10/26/2016 7:18 AM, BartC wrote: Can tkinter do it without creating a distracting pop-up window at the same time? Yes. I already showed how on this thread. Of course, for some text appications, one would be better off with a Text widget than with

Re: Why doesn't Python include non-blocking keyboard input function?

2016-10-26 Thread Terry Reedy
On 10/26/2016 8:33 AM, Marko Rauhamaa wrote: BartC : Say you want to implement a simple, character-based shooting game where the two guns are operated by the [Shift] keys. Unfortunately, the Unix terminal API doesn't make that possible. You need to get the keyboard events

[issue28539] httplib/http.client HTTPConnection._set_hostport() regression

2016-10-26 Thread Charles Stephens
Charles Stephens added the comment: Our internal use case is happening through requests via urllib3 for parsing. Essentially requests is taking the URL, passing it to urllib3 for parsing. urllib3 is returning a namedtuple of type Url which includes a host and port property which is being fed

Re: Why doesn't Python include non-blocking keyboard input function?

2016-10-26 Thread Terry Reedy
On 10/26/2016 7:18 AM, BartC wrote: Can tkinter do it without creating a distracting pop-up window at the same time? Yes. I already showed how on this thread. Of course, for some text appications, one would be better off with a Text widget than with the system-specific console. Bart,

[issue28539] httplib/http.client HTTPConnection._set_hostport() regression

2016-10-26 Thread Martin Panter
Martin Panter added the comment: I tried the original revision 433606e9546c code in Python 2.7 (which still allows mixed tabs and spaces), and it behaves the same as the current version. Thus I suspect revision 9e2b94a3b5dc did not change any behaviour. What is your use case? Why can’t you

Re: multiprocess passing arguments double asterisks

2016-10-26 Thread MRAB
On 2016-10-26 21:44, pic8...@gmail.com wrote: On Monday, October 24, 2016 at 12:39:47 PM UTC-5, Thomas Nyberg wrote: On 10/24/2016 12:45 PM, pic8...@gmail.com wrote: > Thanks for the reply. > > The code snippet given by Peter is not very clear > > I would like to multiprocess a function which

[issue28539] httplib/http.client HTTPConnection._set_hostport() regression

2016-10-26 Thread Charles Stephens
Charles Stephens added the comment: Example with patch applied: Python 2.7.6 (default, Oct 26 2016, 20:33:50) [GCC 4.8.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import httplib >>> con1 = httplib.HTTPConnection('[fe80::26a9:37ff:fe00:f764]', 15482)

[issue28539] httplib/http.client HTTPConnection._set_hostport() regression

2016-10-26 Thread Charles Stephens
Charles Stephens added the comment: I misapplied the term 'regression'. My intent was to describe how original author's change revision 433606e9546c was refactored to make it perform incorrectly. Without the scope specifier, the outcome is the same when HTTPConnection is instantiated. When

[issue2943] Distutils should generate a better error message when the SDK is not installed

2016-10-26 Thread STINNER Victor
STINNER Victor added the comment: Maybe we can add an entry to the Python FAQ, use this link and then add a link to the Microsoft article. -- ___ Python tracker

[issue28522] can't make IDLEX work with python._pth and python-3.6.0b2

2016-10-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: I don't know anything about 'python._pth' and whether there is any bug with respect to that. As far as IDLE goes, there is no bug and this issue should be closed. In #24225, before the release of 3.6.0a2, most file names within idlelib were changed to

thread local storage

2016-10-26 Thread Joseph L. Casale
Looks like the shipped implementation doesn't give access to all the discrete copies of tls for us in a case where a context manager needs to perform any cleanup. Does something exists where I can leverage this feature or do I need to roll my own? Thanks, jlc --

[issue2943] Distutils should generate a better error message when the SDK is not installed

2016-10-26 Thread Ivan Pozdeev
Ivan Pozdeev added the comment: @haypo, as I said, it's undesirable to link to a 3rd party site in a built-in error message because its availability and content are outside the dev team's control. -- ___ Python tracker

[issue28540] math.degrees(sys.float_info.max) should throw an OverflowError exception

2016-10-26 Thread Francisco Couzo
New submission from Francisco Couzo: Most functions in the math library raise an OverflowError when the arguments are finite but the result is not. >>> math.exp(sys.float_info.max) Traceback (most recent call last): File "", line 1, in OverflowError: math range error >>>

[issue28539] httplib/http.client HTTPConnection._set_hostport() regression

2016-10-26 Thread Martin Panter
Martin Panter added the comment: You say this is a regression. Can you point to a version that worked as you want? The IPv6 URL handling you pointed out seems to have been added to 2.4b1, and then backported to 2.3.5. I expect that earlier versions didn’t support IPv6 URLs at all. Also, it

Re: Reversing \N{...} notation?

2016-10-26 Thread Peter Otten
Tim Chase wrote: > On 2016-10-25 20:14, Peter Otten wrote: >> Tim Chase wrote: >> > I like the clarity of using the "\N{...}" notation when creating >> > string literals involving Unicode chars. >> > >> > Is there a built-in way to get such strings back from Python? >> >> >>>

Re: multiprocess passing arguments double asterisks

2016-10-26 Thread pic8690
On Monday, October 24, 2016 at 12:39:47 PM UTC-5, Thomas Nyberg wrote: > On 10/24/2016 12:45 PM, pic8...@gmail.com wrote: > > Thanks for the reply. > > > > The code snippet given by Peter is not very clear > > > > I would like to multiprocess a function which is written in python of the > > form

[issue28539] httplib/http.client HTTPConnection._set_hostport() regression

2016-10-26 Thread Charles Stephens
Changes by Charles Stephens : -- title: httplib/http.client HTTPConnection._get_hostport() regression -> httplib/http.client HTTPConnection._set_hostport() regression ___ Python tracker

[issue28539] httplib/http.client HTTPConnection._set_hostport() regression

2016-10-26 Thread Charles Stephens
Charles Stephens added the comment: Er, that is HTTPConnection._set_hostport() not _get_hostport() -- ___ Python tracker ___

[issue28522] can't make IDLEX work with python._pth and python-3.6.0b2

2016-10-26 Thread Ned Deily
Changes by Ned Deily : -- nosy: +roger.serwy, terry.reedy ___ Python tracker ___ ___

[issue28498] tk busy command

2016-10-26 Thread klappnase
klappnase added the comment: This is something entirely different, since the commands you list here in tk do not accept keyword arguments at all. -- ___ Python tracker

[issue28539] httplib/http.client HTTPConnection._get_hostport() regression

2016-10-26 Thread Charles Stephens
New submission from Charles Stephens: Back through the mists of time, there was a change to strip square brackets IPv6 address host literals in HTTPConnection._get_hostport(): https://hg.python.org/cpython/diff/433606e9546c/Lib/httplib.py However, the code mixed tabs and spaces and was

[issue28046] Remove the concept of platform-specific directories

2016-10-26 Thread Xavier de Gaye
Xavier de Gaye added the comment: 'make install' fails to remove the sysconfigdata module from lib-dynload and prints now instead: rm: cannot remove '/path/to/install/lib/python3.7/lib-dynload/_sysconfigdata_m.py': No such file or directory The patch fixes this. It also removes a

[issue28498] tk busy command

2016-10-26 Thread Miguel
Miguel added the comment: Using the same reasoning applied to tk_busy_hold(), we have to change also these methods: selection_set(self, first, last=None) -> selection_set(self, **kw) coords(self, value=None) -> coords(self, **kw) identify(self, x, y) -> identity(self, **kw)

Re: Reversing \N{...} notation?

2016-10-26 Thread Tim Chase
On 2016-10-25 20:14, Peter Otten wrote: > Tim Chase wrote: > > I like the clarity of using the "\N{...}" notation when creating > > string literals involving Unicode chars. > > > > Is there a built-in way to get such strings back from Python? > > >>> 'mañana'.encode("ascii",

[issue28498] tk busy command

2016-10-26 Thread klappnase
klappnase added the comment: Oops, I guess I violated PEP257 again, sorry, corrected version #4 attached. -- Added file: http://bugs.python.org/file45231/tk_busy_4.diff ___ Python tracker

[issue28498] tk busy command

2016-10-26 Thread klappnase
klappnase added the comment: Ok, I hope I applied all the required changes now. The tests seemed to me to belong to test_misc, so I just added another function to the MiscTest class, I hope that is ok. The test runs well here, so I hope I did everything correctly. Thanks for your patience!

[issue28522] can't make IDLEX work with python._pth and python-3.6.0b2

2016-10-26 Thread Big Stone
Big Stone added the comment: Thanks Eryk, So the root cause is that IDLEX is no more compatible with IDLE in python3.6. ==> I can survive this loss... Now, I don't if the "python._pth" crash is a problem, as I can stay with "#Lib\site-packages" for now. --

[issue28522] can't make IDLEX work with python._pth and python-3.6.0b2

2016-10-26 Thread Big Stone
Big Stone added the comment: Event Viewer says, when I put "Lub\site-packages" in python._pth: Nom de l’application défaillante python.exe, version : 3.6.112.1013, horodatage : 0x57fc0593 Nom du module défaillant : ucrtbase.dll, version : 10.0.14393.0, horodatage : 0x578997b5 Code

[issue2943] Distutils should generate a better error message when the SDK is not installed

2016-10-26 Thread STINNER Victor
STINNER Victor added the comment: Idea: add a link to this article: https://aka.ms/vcpython or full link: https://blogs.msdn.microsoft.com/pythonengineering/2016/04/11/unable-to-find-vcvarsall-bat/ Related tweet from Steve Dower: https://twitter.com/zooba/status/791032320006328320 --

[issue2943] Distutils should generate a better error message when the SDK is not installed

2016-10-26 Thread Vivek Karumudi
Vivek Karumudi added the comment: I cannot understand the cryptic message could you please change it to something meaningful for "Unable to find vcvarsall.bat" -- nosy: +vivekkarumudi ___ Python tracker

[issue28524] Set default argument of logging.disable() to logging.CRITICAL

2016-10-26 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> vinay.sajip priority: normal -> low versions: +Python 3.7 ___ Python tracker

Re: Why doesn't Python include non-blocking keyboard input function?

2016-10-26 Thread BartC
On 26/10/2016 13:33, Marko Rauhamaa wrote: BartC : On 26/10/2016 05:44, Marko Rauhamaa wrote: (I've implemented 'keyboards' both on-screen, and on the surface of digitising tablets (also with a hacked Casio calculator pcb when I couldn't afford a real one). With all of those I

Re: How to use two threads (GUI and backend)

2016-10-26 Thread Marko Rauhamaa
Chris Angelico : > Python-the-language doesn't permit those kinds of rewrites. [Citation needed] Is there something here, perhaps? https://docs.python.org/3/library/concurrency.html> Marko -- https://mail.python.org/mailman/listinfo/python-list

Re: How to use two threads (GUI and backend)

2016-10-26 Thread Chris Angelico
On Thu, Oct 27, 2016 at 1:42 AM, Marko Rauhamaa wrote: > Chris Angelico : >> And since Python doesn't rewrite the code, you don't have a problem. > > Do you mean Python or CPython? > > And how do you know? Both, and I know because Python-the-language doesn't

Re: How to use two threads (GUI and backend)

2016-10-26 Thread Marko Rauhamaa
Chris Angelico : > And since Python doesn't rewrite the code, you don't have a problem. Do you mean Python or CPython? And how do you know? Marko -- https://mail.python.org/mailman/listinfo/python-list

Re: Qtimer and extra argument

2016-10-26 Thread luca72 via Python-list
thanks -- https://mail.python.org/mailman/listinfo/python-list

Re: How to use two threads (GUI and backend)

2016-10-26 Thread Chris Angelico
On Thu, Oct 27, 2016 at 1:21 AM, Marko Rauhamaa wrote: > Analogous code in C or Java would not be guaranteed to finish if func1() > and func2() were in different execution contexts. In fact, it would be > almost guaranteed to hang. > > That is because the compiler can see that

Re: How to use two threads (GUI and backend)

2016-10-26 Thread Marko Rauhamaa
Chris Angelico : > On Thu, Oct 27, 2016 at 12:37 AM, Marko Rauhamaa wrote: >> I don't know what "Global state is shared across all threads" means >> in this context. It sounds like something that would be true for, >> say, Java and C as well. However, those

Re: How to use two threads (GUI and backend)

2016-10-26 Thread jmp
On 10/26/2016 02:45 PM, pozz wrote: Il 26/10/2016 13:16, jmp ha scritto: [...] I suggest you write a GUI that make synchronouscalls to a remote application, if possible. If the remote app is in python, you have access to remote protocols already written for you, Pyro is one of them, you can

[issue28212] Closing server in asyncio is not efficient

2016-10-26 Thread Константин Волков
Константин Волков added the comment: Seems that my example wasn`t good. Real reason in it was that closing server is not closing already established connections, and seems that it is not expected to do. Andrew, can you provide your example? I catched some problems but now I think it was

Re: lxml and xpath(?)

2016-10-26 Thread Peter Otten
Doug OLeary wrote: > Hey; > > Reasonably new to python and incredibly new to xml much less trying to > parse it. I need to identify cluster nodes from a series of weblogic xml > configuration files. I've figured out how to get 75% of them; now, I'm > going after the edge case and I'm unsure how

Re: How to use two threads (GUI and backend)

2016-10-26 Thread Chris Angelico
On Thu, Oct 27, 2016 at 12:37 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> On Wed, Oct 26, 2016 at 11:58 PM, Marko Rauhamaa wrote: >>> I can't think of a valid program that could take advantage of this >>> primitive guarantee of

Re: How to use two threads (GUI and backend)

2016-10-26 Thread Marko Rauhamaa
Chris Angelico : > On Wed, Oct 26, 2016 at 11:58 PM, Marko Rauhamaa wrote: >> I can't think of a valid program that could take advantage of this >> primitive guarantee of Python's. For example, there is no "volatile" >> in Python so you can't coordinate Python

[issue5996] abstract class instantiable when subclassing dict

2016-10-26 Thread R. David Murray
R. David Murray added the comment: My apologies, I added Nathaniel to nosy here when I closed the duplicate, but forgot to add a link to the closed issue: issue 28537. -- nosy: +r.david.murray ___ Python tracker

Re: How to use two threads (GUI and backend)

2016-10-26 Thread Chris Angelico
On Thu, Oct 27, 2016 at 12:02 AM, Marko Rauhamaa wrote: > pozz : > >> The real problem is that retrieving status from remote device is a >> slow operation. If the GUI thread blocks waiting for the answer, the >> GUI blocks and the user complains. > > Correct.

Re: Qtimer and extra argument

2016-10-26 Thread Phil Thompson
On 26 Oct 2016, at 1:29 pm, luca72 via Python-list wrote: > > I get () missing 1 required positional argument: 's' Sorry, it should have been... lambda: self.metto_testo(testo) Phil -- https://mail.python.org/mailman/listinfo/python-list

Re: How to use two threads (GUI and backend)

2016-10-26 Thread Marko Rauhamaa
pozz : > The real problem is that retrieving status from remote device is a > slow operation. If the GUI thread blocks waiting for the answer, the > GUI blocks and the user complains. Correct. Obnoxious, blocking APIs abound. However, I have usually used processes (instead

Re: How to use two threads (GUI and backend)

2016-10-26 Thread Chris Angelico
On Wed, Oct 26, 2016 at 11:58 PM, Marko Rauhamaa wrote: > In practice, this coherency has been implemented in CPython with a > global lock (GIL). CPython programs are effectively single-threaded. > They only let go of the lock when they are performing a system call. > > I can't

Re: How to use two threads (GUI and backend)

2016-10-26 Thread Marko Rauhamaa
pozz : > Il 26/10/2016 13:27, Antoon Pardon ha scritto: >> Op 26-10-16 om 12:22 schreef pozz: >>> Is it safe to access this variable from two different threads? >>> Should I implement a safer and more complex mechanism? If yes, what >>> mechanism? >> >> Accessing from multiple

Re: How to use two threads (GUI and backend)

2016-10-26 Thread pozz
Il 26/10/2016 13:16, jmp ha scritto: [...] I suggest you write a GUI that make synchronouscalls to a remote application, if possible. If the remote app is in python, you have access to remote protocols already written for you, Pyro is one of them, you can skip the low level communication

Re: How to use two threads (GUI and backend)

2016-10-26 Thread pozz
Il 26/10/2016 13:27, Antoon Pardon ha scritto: Op 26-10-16 om 12:22 schreef pozz: Il 26/10/2016 09:13, pozz ha scritto: [...] When the user press Start button (the pressed handler is in the GUI class): self.comm_active = True threading.Thread(target=self.comm_thread).start() The backend

Re: Why doesn't Python include non-blocking keyboard input function?

2016-10-26 Thread Marko Rauhamaa
BartC : > On 26/10/2016 05:44, Marko Rauhamaa wrote: > (I've implemented 'keyboards' both on-screen, and on the surface of > digitising tablets (also with a hacked Casio calculator pcb when I > couldn't afford a real one). With all of those I was mainly interested > in key

Re: UDP decode

2016-10-26 Thread Julian Madoz
Thanks for response! I don't know what can appear because the values changes 30 times per second. I only know the format. -- https://mail.python.org/mailman/listinfo/python-list

[issue28530] Howto detect if an object is of type os.DirEntry

2016-10-26 Thread stephan
stephan added the comment: Some questions: - if posix.DirEntry is exposed I think nt.DirEntry and os.DirEntry (this one is mentioned in the documentation) should be exposed - will this bw backported to 3.5 lets say 3.5.3? -- ___ Python

Re: Qtimer and extra argument

2016-10-26 Thread luca72 via Python-list
I get () missing 1 required positional argument: 's' -- https://mail.python.org/mailman/listinfo/python-list

Re: Why doesn't Python include non-blocking keyboard input function?

2016-10-26 Thread BartC
On 26/10/2016 05:44, Marko Rauhamaa wrote: BartC : Some people want to work at low level, without needing to drag in a GUI, and want to do something as simple as finding out if a button has been pressed on a standard peripheral that nearly every computer has. It can't be that

Re: How to use two threads (GUI and backend)

2016-10-26 Thread Antoon Pardon
Op 26-10-16 om 12:22 schreef pozz: > Il 26/10/2016 09:13, pozz ha scritto: > > [...] >> When the user press Start button (the pressed handler is in the GUI >> class): >> >> self.comm_active = True >> threading.Thread(target=self.comm_thread).start() >> >> The backend thread is: >> >> def

Re: Why doesn't Python include non-blocking keyboard input function?

2016-10-26 Thread BartC
On 26/10/2016 02:02, Steve D'Aprano wrote: On Tue, 25 Oct 2016 09:02 pm, BartC wrote: raw_input('Press the Enter key to continue... ') Which doesn't work on Python 3. So even here, making it easy by using line-input, it's not so straightforward. Really, Bart? You're stymied by the change

Re: How to use two threads (GUI and backend)

2016-10-26 Thread jmp
On 10/26/2016 12:22 PM, pozz wrote: Il 26/10/2016 09:13, pozz ha scritto: > [...] When the user press Start button (the pressed handler is in the GUI class): self.comm_active = True threading.Thread(target=self.comm_thread).start() The backend thread is: def comm_thread(self):

ANN: psutil 4.4.2 released

2016-10-26 Thread Giampaolo Rodola'
Hello all, I'm glad to announce the release of psutil 4.4.2: https://github.com/giampaolo/psutil About = psutil (process and system utilities) is a cross-platform library for retrieving information on running processes and system utilization (CPU, memory, disks, network) in Python. It is

[RELEASE] ‘python-daemon’ version 2.1.2 released

2016-10-26 Thread Ben Finney
Howdy all, I am pleased to announce the release of version 2.1.2 of the ‘python-daemon’ library. The current release is always available at . Significant changes since the previous version ==

Cython 0.25 released

2016-10-26 Thread Robert Bradshaw
I'm happy to announce the release of Cython 0.25 which has numerous new features and bug fixes. It is available at https://pypi.python.org/pypi/Cython We have also moved bug tracking from trac.cython.org to github issues. However, user support still remains at cython-users@, please refrain from

[RELEASE] ‘python-daemon’ version 2.1.2 released

2016-10-26 Thread Ben Finney
Howdy all, I am pleased to announce the release of version 2.1.2 of the ‘python-daemon’ library. The current release is always available at . Significant changes since the previous version ==

Re: How to use two threads (GUI and backend)

2016-10-26 Thread pozz
Il 26/10/2016 09:13, pozz ha scritto: > [...] When the user press Start button (the pressed handler is in the GUI class): self.comm_active = True threading.Thread(target=self.comm_thread).start() The backend thread is: def comm_thread(self): while self.comm_active:

[issue28509] dict.update allocates too much

2016-10-26 Thread INADA Naoki
INADA Naoki added the comment: OK, I won't change it to allow additional resize while merging, after pre-resize. But current code has two problem: * Pre-resize happen even when resizing is not necessary. (ex. two dict has same keys). * Pre-resize allocates too much memory which doesn't make

Re: Qtimer and extra argument

2016-10-26 Thread Phil Thompson
On 26 Oct 2016, at 10:36 am, luca72 via Python-list wrote: > > Hello i hope that yo can reply to this question also if the argument is pyqt > > i have a simple test: > def start_timer(self): >self.timer = QTimer() >testo = 'pressed' >

Re: ImportError: No module named 'simstring'

2016-10-26 Thread Ben Finney
Daiyue Weng writes: > Hi, I am trying to install simstring on Windows 10 through pip/conda, but > couldn't find the package. Pip installs packages listed on the Python Package Index (PyPI) , do any of the search results there match what you

Qtimer and extra argument

2016-10-26 Thread luca72 via Python-list
Hello i hope that yo can reply to this question also if the argument is pyqt i have a simple test: def start_timer(self): self.timer = QTimer() testo = 'pressed' self.timer.singleShot(1000, self.metto_testo) def test(self, testo): self.lineEdit.setText(testo)

[issue26865] Meta-issue: support of the android platform

2016-10-26 Thread Xavier de Gaye
Xavier de Gaye added the comment: issue #28538: _socket module cross-compilation error on android-24 -- dependencies: +_socket module cross-compilation error on android-24 ___ Python tracker

ImportError: No module named 'simstring'

2016-10-26 Thread Daiyue Weng
Hi, I am trying to install simstring on Windows 10 through pip/conda, but couldn't find the package. I am using Pycharm + Anaconda, so I am wondering is it possible to install simstring on Windows, and how. Cheers -- https://mail.python.org/mailman/listinfo/python-list

[issue28538] _socket module cross-compilation error on android-24

2016-10-26 Thread Xavier de Gaye
New submission from Xavier de Gaye: On the latest Android API level (android-24), the if_nameindex function is now found by configure in Android libc. But the if_nameindex function and structure are still not defined in the Android net/if.h header. The compilation fails with: clang

[issue2506] Add mechanism to disable optimizations

2016-10-26 Thread STINNER Victor
STINNER Victor added the comment: I would suggest -X noopt and use "noopt" in .pyc filenames. That's what I proposed in my PEP 511. -- ___ Python tracker

[issue2506] Add mechanism to disable optimizations

2016-10-26 Thread STINNER Victor
STINNER Victor added the comment: Since the discussion restarted, I reopen the issue and assigned it to Python 3.6. Maybe it's too late for such tiny change? -- resolution: rejected -> status: closed -> open versions: +Python 3.6 -Python 3.5 ___

[issue23262] webbrowser module broken with Firefox 36+

2016-10-26 Thread Oleg Broytman
Oleg Broytman added the comment: Done. -- versions: -Python 2.7 Added file: http://bugs.python.org/file45228/webbrowser.py-3.5.patch ___ Python tracker

[issue23262] webbrowser module broken with Firefox 36+

2016-10-26 Thread Oleg Broytman
Changes by Oleg Broytman : Removed file: http://bugs.python.org/file45025/webbrowser.py-3.4-newfox.patch ___ Python tracker ___

[issue23262] webbrowser module broken with Firefox 36+

2016-10-26 Thread Oleg Broytman
Changes by Oleg Broytman : Removed file: http://bugs.python.org/file45216/webbrowser.py-3.5-newfox.patch ___ Python tracker ___

[issue23262] webbrowser module broken with Firefox 36+

2016-10-26 Thread Oleg Broytman
Changes by Oleg Broytman : Removed file: http://bugs.python.org/file45027/webbrowser.py-2.7-newfox.patch ___ Python tracker ___

[issue23262] webbrowser module broken with Firefox 36+

2016-10-26 Thread Oleg Broytman
Changes by Oleg Broytman : Removed file: http://bugs.python.org/file45218/test_webbrowser.py-3.5-newfox.patch ___ Python tracker ___

[issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target

2016-10-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue23262] webbrowser module broken with Firefox 36+

2016-10-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please provide a patch including all changes in unified format? -- ___ Python tracker ___

[issue27838] test_os.test_chown() failure on koobs-freebsd-current

2016-10-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch adds more verbose output in tests. Hope this will help to diagnose a problem. It also fixes test_chown_without_permission which can fail if run as a user next after root (uid=1 or like). -- keywords: +patch nosy: +serhiy.storchaka

Re: How to use two threads (GUI and backend)

2016-10-26 Thread pozz
Il 26/10/2016 09:13, pozz ha scritto: > [...] What is the best approach to use in my scenario (GUI and backend communication)? I just found this[1] page, where the thread approach is explained with the following code: --- import threading import time from gi.repository import GLib,

How to use two threads (GUI and backend)

2016-10-26 Thread pozz
I'm designing a GUI application in Python (with pyGObject, so GTK). The application communicates with a remote device (connected through RS232, but it could be on Internet) to retrieve its status and set/get its configuration. When the user press "Start" button, the application starts