Re: ensurepip

2017-06-13 Thread Pavol Lisy
$ python3 -m ensurepip /usr/bin/python3: No module named ensurepip But maybe this help to understand: $ python -m ensurepip ensurepip is disabled in Debian/Ubuntu for the system python. Python modules For the system python are usually handled by dpkg and apt-get. apt-get install python- In

ensurepip

2017-06-13 Thread Steven D'Aprano
ensurepip is added in Python 3.4: https://docs.python.org/3/library/ensurepip.html But: root@runes:~# python3.4 -m ensurepip /usr/bin/python3.4: No module named ensurepip Any clues on what is going on or how to diagnose this? -- Steve -- https://mail.python.org/mailman/listinfo/python-

Re: Test String Contents

2017-06-13 Thread Peter Otten
Peter Otten wrote: > Matt wrote: > >> What is easiest way to determine if a string ONLY contains a-z upper >> or lowercase. I also want to allow the "-" and "_" symbols. No >> spaces or anything else. > > If you don't know regular expressions here's a method where not much can > go wrong: ...

Re: Test String Contents

2017-06-13 Thread Thomas Nyberg
On 06/13/2017 03:34 PM, Matt wrote: > What is easiest way to determine if a string ONLY contains a-z upper > or lowercase. I also want to allow the "-" and "_" symbols. No > spaces or anything else. > I'm not sure it's the best way, but the following seems okay: >>> s = 'hello_world' >>> s.repl

Re: Test String Contents

2017-06-13 Thread Peter Otten
Matt wrote: > What is easiest way to determine if a string ONLY contains a-z upper > or lowercase. I also want to allow the "-" and "_" symbols. No > spaces or anything else. If you don't know regular expressions here's a method where not much can go wrong: >>> import string >>> acceptable =

Test String Contents

2017-06-13 Thread Matt
What is easiest way to determine if a string ONLY contains a-z upper or lowercase. I also want to allow the "-" and "_" symbols. No spaces or anything else. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to store some elements from a list into another

2017-06-13 Thread Grant Edwards
On 2017-06-13, Peter Otten <__pete...@web.de> wrote: > Grant Edwards wrote: > >> On 2017-06-13, Peter Otten <__pete...@web.de> wrote: >> def edges(items): # where items is a non-empty iterator first = next(items) last = functools.reduce(sekond, items, first) return

Re: How to store some elements from a list into another

2017-06-13 Thread Peter Otten
Grant Edwards wrote: > On 2017-06-13, Peter Otten <__pete...@web.de> wrote: > >>> def edges(items): # where items is a non-empty iterator >>> first = next(items) >>> last = functools.reduce(sekond, items, first) >>> return [first, last] >>> >>> Of course, right? >> >> Yeah, reduce()

Re: How to store some elements from a list into another

2017-06-13 Thread Grant Edwards
On 2017-06-13, Peter Otten <__pete...@web.de> wrote: >> def edges(items): # where items is a non-empty iterator >> first = next(items) >> last = functools.reduce(sekond, items, first) >> return [first, last] >> >> Of course, right? > > Yeah, reduce() is certainly the cherry on the ite

Re: How to store some elements from a list into another

2017-06-13 Thread Peter Otten
Jussi Piitulainen wrote: > Peter Otten writes: > > ... > >> def edges(items): >> first = last = next(items) >> for last in items: >> pass >> return [first, last] > > ... > >> However, this is infested with for loops. Therefore > > ... > >> I don't immediately see what to

Re: Progress on the Gilectomy

2017-06-13 Thread Skip Montanaro
On Tue, Jun 13, 2017 at 1:53 PM, Terry Reedy wrote: > This was tried at least once, perhaps 15 years ago. Yes, I believe Greg Smith (?) implemented a proof-of-concept in about the Python 1.4 timeframe. The observation at the time was that it slowed down single-threaded programs too much to be a

Re: Progress on the Gilectomy

2017-06-13 Thread Terry Reedy
On 6/13/2017 12:09 PM, Robin Becker wrote: On 11/06/2017 07:27, Steve D'Aprano wrote: I'm tired of people complaining about the GIL as a "mistake" without acknowledging that it exists for a reason. I thought we were also consenting adults about problems arising from bad extensions. T

Re: Progress on the Gilectomy

2017-06-13 Thread Skip Montanaro
On Tue, Jun 13, 2017 at 11:09 AM, Robin Becker wrote: > I looked at Larry's talk with interest. The GIL is not a requirement as he > pointed out at the end, both IronPython and Jython don't need it. But they don't support CPython's extension module API either, I don't think. (I imagine that mig

Re: Progress on the Gilectomy

2017-06-13 Thread Robin Becker
On 11/06/2017 07:27, Steve D'Aprano wrote: I'm tired of people complaining about the GIL as a "mistake" without acknowledging that it exists for a reason. I thought we were also consenting adults about problems arising from bad extensions. The GIL is a blocker for cpython's ability

Re: How to store some elements from a list into another

2017-06-13 Thread breamoreboy
On Monday, June 12, 2017 at 7:33:03 PM UTC+1, José Manuel Suárez Sierra wrote: > Hello, > I am stuck with a (perhaps) easy problem, I hope someone can help me: > > My problem is: > I have a list of lists like this one: > [[55, 56, 57, 58, 83, 84, 85, 86, 89, 90, 91, 92, 107, 108, 109, 110, 111, >

Re: How to decompile an exe file compiled by py2exe?

2017-06-13 Thread Irving Duran
This might be what you are looking for -> https://stackoverflow.com/questions/6287918/how-to-decompile-an-exe-file-compiled-by-py2exe On Tue, Jun 13, 2017 at 8:52 AM Xristos Xristoou wrote: > hello > > How to decompile an exe file compiled by py2exe? > in my file i have a library.zip file i dont

How to decompile an exe file compiled by py2exe?

2017-06-13 Thread Xristos Xristoou
hello How to decompile an exe file compiled by py2exe? in my file i have a library.zip file i dont if that help this work. i need some easy because i am very new i try some programs but without results. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to store some elements from a list into another

2017-06-13 Thread Jussi Piitulainen
Peter Otten writes: ... > def edges(items): > first = last = next(items) > for last in items: > pass > return [first, last] ... > However, this is infested with for loops. Therefore ... > I don't immediately see what to do about the for loop in edges(), so > I'll use the t

Re: How to store some elements from a list into another

2017-06-13 Thread Peter Otten
Jussi Piitulainen wrote: > breamore...@gmail.com writes: > >> On Monday, June 12, 2017 at 7:33:03 PM UTC+1, José Manuel Suárez Sierra >> wrote: >>> Hello, >>> I am stuck with a (perhaps) easy problem, I hope someone can help me: >>> >>> My problem is: >>> I have a list of lists like this one: >>

Re: Customise the virtualenv `activate` script

2017-06-13 Thread Cameron Simpson
On 13Jun2017 11:57, Ben Finney wrote: Many of the code bases for which I use a Python virtualenv, need additional (custom) environment variables set, each time the virtualenv is activated. How can I make this easy for developers who already know how to activate a virtualenv? * Edit the ‘$VENV/

Re: How to store some elements from a list into another

2017-06-13 Thread Jussi Piitulainen
breamore...@gmail.com writes: > On Monday, June 12, 2017 at 7:33:03 PM UTC+1, José Manuel Suárez Sierra wrote: >> Hello, >> I am stuck with a (perhaps) easy problem, I hope someone can help me: >> >> My problem is: >> I have a list of lists like this one: >> [[55, 56, 57, 58, 83, 84, 85, 86, 89,