Re: [Theory] How to speed up python code execution / pypy vs GPU

2016-11-06 Thread dieter
"Mr. Wrobel" writes: > ... > However the same skeptics told my that, ok we believe that it is true, > however the code execution is much slower than any other compiled > language. However, in many cases "code execution speed" is not the primary concern. In my experience, "development speed" is fa

Re: pip3 : command not found

2016-11-06 Thread Jon Ribbens
On 2016-11-06, Michael Torrie wrote: > I'm guessing that it notices by examining the path it was launched from > and looks for virtual environment files relative to that path. Indeed, the mysterious thing is what are "virtual environment files"? The official docs say "A venv is a directory tree w

Re: pip3 : command not found

2016-11-06 Thread Jon Ribbens
On 2016-11-06, Chris Angelico wrote: > On Sun, Nov 6, 2016 at 4:27 PM, Jon Ribbens wrote: >>> 2) If Python notices that its executable comes from a venv, it uses it. >> >> Yes. My question is *how does it notice*? > > I could answer this question, but since you don't appear to be > following the

Re: Fwd: About Installation.

2016-11-06 Thread MRAB
On 2016-11-06 19:36, Avijit Paul wrote: I installed python-3.6.0b2-amd64 on my Windows PC. Which is running on 64-bit system of Windows 8.1. The installation was successful. After the installation, when I ran the program it showed the following error, as shows in the attachment. I need your kin

Re: Confused with installing per-user in Windows

2016-11-06 Thread Ivan Pozdeev via Python-list
On 07.11.2016 4:11, ddbug wrote: Dear experts, I need to install some scripts for current user (to skip sudo, UAC popups and whatever). So I make a sdist and use python -m pip install --user This should work for either Python 2 or 3. On Linux, pip installs the scripts into ~/.local/bin

Fwd: About Installation.

2016-11-06 Thread Avijit Paul
-- Forwarded message -- From: Avijit Paul Date: Mon, Nov 7, 2016 at 1:27 AM Subject: About Installation. To: python-list@python.org Hello, I installed python-3.6.0b2-amd64 on my Windows PC. Which is running on 64-bit system of Windows 8.1. The installation was successful. After

What is currently the recommended way to work with a distutils-based setup.py that requires compilation?

2016-11-06 Thread Ivan Pozdeev via Python-list
https://wiki.python.org/moin/WindowsCompilers has now completely replaced instructions for `distutils`-based packages (starting with `from distutils.core import setup`) with ones for `setuptools`-based ones (starting with `from setuptools import setup`). However, if I have a `distutils`-based

Re: Confused with installing per-user in Windows

2016-11-06 Thread ddbug
So basically I want to modify py.exe to not only detect the Python version from a script file, but also help locating the script file. -- d -- https://mail.python.org/mailman/listinfo/python-list

Confused with installing per-user in Windows

2016-11-06 Thread ddbug
Dear experts, I need to install some scripts for current user (to skip sudo, UAC popups and whatever). So I make a sdist and use python -m pip install --user This should work for either Python 2 or 3. On Linux, pip installs the scripts into ~/.local/bin ; users are instructed to add this

Re: Delete h2 until you reach the next h2 in beautifulsoup

2016-11-06 Thread rosefox911
On Sunday, November 6, 2016 at 1:27:48 AM UTC-4, rosef...@gmail.com wrote: > Considering the following html: > > cool stuff hiid="cool"> zz > > and the following list: > > ignore_list = ['example','lalala'] > > My goal is, while going through the HTML using Beautifulsoup, I find

ANN: released psutil 5.0.0, introducing a 2x speedup for process methods

2016-11-06 Thread Giampaolo Rodola'
Hello all, I'm glad to announce the release of psutil 5.0.0: https://github.com/giampaolo/psutil This release introduces important speedups making psutil from 2x to 6x faster depending on what platform you're on. A full blog post can be found here: http://grodola.blogspot.com/2016/11/psutil-500-is-

A Python App To Calculate Sum Of Different Elements In A List With Different Values

2016-11-06 Thread Abdullahi Salihu Abubakar
Hello! Hope you guys are fine. I am a newbie in programming, though I have been experimenting with Python for close to 3 years, but have never attempt writing any real-life program. However, recently I decided to embark on a personal project to develop a Python App which I want to dedicate to

Re:

2016-11-06 Thread Chris Angelico
On Sun, Nov 6, 2016 at 12:33 AM, Abdullahi Salihu Abubakar wrote: > [lots of text, taking a representative sample] > 4. I presently use list to hold the list of beneficiaries. Based on the > short description of the proposed app above, which other container is it > suitable for holding the categ

A Python App To Calculate Sum Of Different Elements In A List With Different Values

2016-11-06 Thread Abdullahi Salihu Abubakar
Hello! Hope you guys are fine. I am a newbie in programming, though I have been experimenting with Python for close to 3 years, but have never attempt writing any real-life program. However, recently I decided to embark on a personal project to develop a Python App which I want to dedicate to m

Re: Pre-pep discussion material: in-place equivalents to map and filter

2016-11-06 Thread Chris Angelico
On Sun, Nov 6, 2016 at 12:50 AM, Arthur Havlicek wrote: > 2016-11-05 12:47 GMT+01:00 Chris Angelico : > >> On Sat, Nov 5, 2016 at 9:50 PM, Arthur Havlicek >> >> But here's the thing. For everyone who writes a decorator function, >> there could be dozens who use it. >> > > The day that one guy leav

[no subject]

2016-11-06 Thread Abdullahi Salihu Abubakar
Hello! Hope you guys are fine. I am a newbie in programming, though I have been experimenting with Python for close to 3 years, but have never attempt writing any real-life program. However, recently I decided to embark on a personal project to develop a Python App which I want to dedicate to m

Re: Pre-pep discussion material: in-place equivalents to map and filter

2016-11-06 Thread Arthur Havlicek
2016-11-05 12:47 GMT+01:00 Chris Angelico : > On Sat, Nov 5, 2016 at 9:50 PM, Arthur Havlicek > > But here's the thing. For everyone who writes a decorator function, > there could be dozens who use it. > The day that one guy leaves the team, suddenly you have code that's become a bit tricky to ma

Re: pip3 : command not found

2016-11-06 Thread Michael Torrie
On 11/05/2016 11:27 PM, Jon Ribbens wrote: >> 2) If Python notices that its executable comes from a venv, it uses it. > > Yes. My question is *how does it notice*? I'm guessing that it notices by examining the path it was launched from and looks for virtual environment files relative to that path

Re: Force virtualenv pip to be used

2016-11-06 Thread Chris Angelico
On Sun, Nov 6, 2016 at 10:19 PM, Peter Otten <__pete...@web.de> wrote: > Chris Angelico wrote: > >> On Sun, Nov 6, 2016 at 9:17 PM, Alec Taylor >> wrote: >>> Running Ubuntu 16.10 with Python 2.7.12+ (default one) and virtualenv >>> 15.0.3 (`sudo -H pip install virtualenv`). What am I doing wrong?

Re: passing a variable to cmd

2016-11-06 Thread Chris Angelico
On Sun, Nov 6, 2016 at 10:48 PM, SS wrote: > # cmd='dig @4.2.2.2 nbc.com ns +short' > cmd="dig @4.2.2.2 %s ns +short", % (domname) > proc=subprocess.Popen(shlex.split(cmd),stdout=subprocess.PIPE) > out,err=proc.communicate() > print(out) > > The line that is commented out works fine. However, I w

Re: passing a variable to cmd

2016-11-06 Thread Terry Reedy
On 11/6/2016 6:48 AM, SS wrote: cmd="dig @4.2.2.2 %s ns +short", % (domname) does not work. No kidding. ', %' is a syntax error. The , makes a tuple, the % after string does interpolation. You obviously want the latter so omit the ,. The traceback should have pointed you to where the co

Re: Force virtualenv pip to be used

2016-11-06 Thread Peter Otten
Alec Taylor wrote: > On Sunday, November 6, 2016 at 10:20:53 PM UTC+11, Peter Otten wrote: >> Chris Angelico wrote: >> >> > On Sun, Nov 6, 2016 at 9:17 PM, Alec Taylor >> > wrote: >> >> Running Ubuntu 16.10 with Python 2.7.12+ (default one) and virtualenv >> >> 15.0.3 (`sudo -H pip install virtu

Re: passing a variable to cmd

2016-11-06 Thread Jason Friedman
> > import subprocess > import shlex > > domname = raw_input("Enter your domain name: "); > print "Your domain name is: ", domname > > print "\n" > > # cmd='dig @4.2.2.2 nbc.com ns +short' > cmd="dig @4.2.2.2 %s ns +short", % (domname) > proc=subprocess.Popen(shlex.split(cmd),stdout=subprocess.PIPE

passing a variable to cmd

2016-11-06 Thread SS
Note the following code: import subprocess import shlex domname = raw_input("Enter your domain name: "); print "Your domain name is: ", domname print "\n" # cmd='dig @4.2.2.2 nbc.com ns +short' cmd="dig @4.2.2.2 %s ns +short", % (domname) proc=subprocess.Popen(shlex.split(cmd),stdout=subprocess

Regarding the parsing of await expression.

2016-11-06 Thread Shiyao Ma
Hi, In the pep, https://www.python.org/dev/peps/pep-0492/#examples-of-await-expressions It is said, await await coro() is SyntaxError, instead, we should use await (await coro()) Why? because of await is not left-associative? also, for await -coro() , it should be written as, await (-coro

Re: Force virtualenv pip to be used

2016-11-06 Thread Alec Taylor
On Sunday, November 6, 2016 at 10:20:53 PM UTC+11, Peter Otten wrote: > Chris Angelico wrote: > > > On Sun, Nov 6, 2016 at 9:17 PM, Alec Taylor > > wrote: > >> Running Ubuntu 16.10 with Python 2.7.12+ (default one) and virtualenv > >> 15.0.3 (`sudo -H pip install virtualenv`). What am I doing wro

Re: Force virtualenv pip to be used

2016-11-06 Thread Peter Otten
Chris Angelico wrote: > On Sun, Nov 6, 2016 at 9:17 PM, Alec Taylor > wrote: >> Running Ubuntu 16.10 with Python 2.7.12+ (default one) and virtualenv >> 15.0.3 (`sudo -H pip install virtualenv`). What am I doing wrong? >> >> $ virtualenv a && . "$_"/bin/activate && pip --version > > I'm pret

Re: pip3 : command not found

2016-11-06 Thread Chris Angelico
On Sun, Nov 6, 2016 at 4:27 PM, Jon Ribbens wrote: >> 2) If Python notices that its executable comes from a venv, it uses it. > > Yes. My question is *how does it notice*? I could answer this question, but since you don't appear to be following the thread properly, I'll point out that it's alread

Re: Force virtualenv pip to be used

2016-11-06 Thread Chris Angelico
On Sun, Nov 6, 2016 at 9:17 PM, Alec Taylor wrote: > Running Ubuntu 16.10 with Python 2.7.12+ (default one) and virtualenv > 15.0.3 (`sudo -H pip install virtualenv`). What am I doing wrong? > > $ virtualenv a && . "$_"/bin/activate && pip --version I'm pretty sure virtualenv (like venv, abou

Re: Force virtualenv pip to be used

2016-11-06 Thread Peter Otten
Alec Taylor wrote: > Running Ubuntu 16.10 with Python 2.7.12+ (default one) and virtualenv > 15.0.3 (`sudo -H pip install virtualenv`). What am I doing wrong? > > $ virtualenv a && . "$_"/bin/activate && pip --version > New python executable in /tmp/a/bin/python > Installing setuptool

Force virtualenv pip to be used

2016-11-06 Thread Alec Taylor
Running Ubuntu 16.10 with Python 2.7.12+ (default one) and virtualenv 15.0.3 (`sudo -H pip install virtualenv`). What am I doing wrong? $ virtualenv a && . "$_"/bin/activate && pip --version New python executable in /tmp/a/bin/python Installing setuptools, pip, wheel...done. pip 9.