Re: [Python-ideas] install pip packages from Python prompt

2017-11-02 Thread Nick Coghlan
On 3 November 2017 at 02:22, Ivan Levkivskyi wrote: > Just another random idea: What about simply having two menu items in IDLE: > > * Install/update package manager > * Open package manager > > The first one will install the pipgui from PyPI (and pip if not already > installed). > The second one

Re: [Python-ideas] install pip packages from Python prompt

2017-11-02 Thread Erik Bray
On Oct 30, 2017 8:57 PM, "Alex Walters" wrote: > -Original Message- > From: Python-ideas [mailto:python-ideas-bounces+tritium- > list=sdamon@python.org] On Behalf Of Erik Bray > Sent: Monday, October 30, 2017 6:28 AM > To: Python-Ideas > Subject: Re: [Python-ideas] install pip pack

Re: [Python-ideas] install pip packages from Python prompt

2017-11-02 Thread Ivan Levkivskyi
Just another random idea: What about simply having two menu items in IDLE: * Install/update package manager * Open package manager The first one will install the pipgui from PyPI (and pip if not already installed). The second one will run the GUI. This way it looks like pipgui can be simply publ

Re: [Python-ideas] Importance of noticing new signals

2017-11-02 Thread Antoine Pitrou
On Thu, 2 Nov 2017 14:57:12 +0200 Koos Zevenhoven wrote: > > Now, is the "sequentially consistent" ordering on is_tripped sufficient > > to guarantee that signals won't be missed on a weak-ordering platform? > > I *think* so, but an expert would need to check that code (or we > > cross our fingers

Re: [Python-ideas] Importance of noticing new signals

2017-11-02 Thread Koos Zevenhoven
On Thu, Nov 2, 2017 at 2:22 PM, Antoine Pitrou wrote: > On Wed, 1 Nov 2017 20:29:56 +0200 > Koos Zevenhoven wrote: > > > > ​From a correctness point of view, that is absolutely great: if > > PyErr_CheckSignals() is called, it is guaranteed to notice a new signal > > regardles of how small the nu

Re: [Python-ideas] Add single() to itertools

2017-11-02 Thread Neil Girdhar
This request is called "one" in more-itertools: http://more-itertools.readthedocs.io/en/latest/api.html It raises ValueError as Steve suggested. On Monday, October 30, 2017 at 8:34:26 AM UTC-6, Guido van Rossum wrote: > > This is a key example of a case where code speaks. Can you write an > imp

[Python-ideas] Importance of noticing new signals

2017-11-02 Thread Antoine Pitrou
On Wed, 1 Nov 2017 20:29:56 +0200 Koos Zevenhoven wrote: > > ​From a correctness point of view, that is absolutely great: if > PyErr_CheckSignals() is called, it is guaranteed to notice a new signal > regardles of how small the number of picoseconds after the `is_tripped` > flag has been set. Bu

Re: [Python-ideas] Membership of infinite iterators

2017-11-02 Thread Koos Zevenhoven
On Thu, Nov 2, 2017 at 1:41 PM, Antoine Pitrou wrote: > On Thu, 2 Nov 2017 13:27:17 +0200 > Koos Zevenhoven wrote: > > ​There's a limit to how cheap the call to PyErr_CheckSignals() can be. > As I > > mentioned earlier, even just the fact that it's a C function call​ can be > > too much. > > > >

Re: [Python-ideas] Membership of infinite iterators

2017-11-02 Thread Antoine Pitrou
On Thu, 2 Nov 2017 13:27:17 +0200 Koos Zevenhoven wrote: > ​There's a limit to how cheap the call to PyErr_CheckSignals() can be. As I > mentioned earlier, even just the fact that it's a C function call​ can be > too much. > > That's why, in the above, I used a new name PyErr_PROBE_SIGNALS() inst

Re: [Python-ideas] Membership of infinite iterators

2017-11-02 Thread Koos Zevenhoven
On Thu, Nov 2, 2017 at 3:39 AM, Nick Coghlan wrote: > On 2 November 2017 at 04:29, Koos Zevenhoven wrote: > >> SPOILER ALERT! At the moment, Nick's statement is in fact **always** >> true in **all** cases (at least when ignoring untypical cases and some >> inaccuracies in phrasing). ​Another que

Re: [Python-ideas] install pip packages from Python prompt

2017-11-02 Thread Nick Coghlan
On 2 November 2017 at 18:46, Nathaniel Smith wrote: > But unfortuately this hasn't been standardized, and there's currently > no way to do the lookup from the stdlib, so maybe this is not so > helpful for IDLE... > The entry point file format was recently promoted to a PyPA interoperability spec

Re: [Python-ideas] install pip packages from Python prompt

2017-11-02 Thread Nathaniel Smith
On Wed, Nov 1, 2017 at 2:47 PM, Terry Reedy wrote: > When pip installs a package into site_packages, does it at any point run > package-specific installation code? setup.py? Nope. That's a can of worms that we've so far avoided opening. > More specifically, can pip > install an IDLE extension.