Re: Call a shell command from Python (was: Calling Bash Command From Python)

2016-10-30 Thread Chris Angelico
On Mon, Oct 31, 2016 at 3:44 PM, Ben Finney wrote: > Note that ‘sudo’ is specifically designed to be invoked interactively, > seeking to verify that the current user has credentials to run the > command. > > Note further that ‘sudo’ will record when the *current user session* > last invoked ‘sudo’

Call a shell command from Python (was: Calling Bash Command From Python)

2016-10-30 Thread Ben Finney
Wildman via Python-list writes: > Python 2.7.9 on Linux > > Here is a bash command that I want to run from a python > program: sudo grep "^user\:" /etc/shadow Some points to note: * Those commands are not special to Bash, or any particular shell. They invoke commands, without AFAIK any speci

Re: Calling Bash Command From Python

2016-10-30 Thread Chris Angelico
On Mon, Oct 31, 2016 at 3:19 PM, Wildman via Python-list wrote: > Here is a bash command that I want to run from a python > program: sudo grep "^user\:" /etc/shadow > > If I enter the command directly into a terminal it works > perfectly. If I run it from a python program it returns an > empty s

Calling Bash Command From Python

2016-10-30 Thread Wildman via Python-list
Python 2.7.9 on Linux Here is a bash command that I want to run from a python program: sudo grep "^user\:" /etc/shadow If I enter the command directly into a terminal it works perfectly. If I run it from a python program it returns an empty string. Below is the code I am using. Suggestions ap

Re: pip3 : command not found

2016-10-30 Thread INADA Naoki
> How do I fix this? Maybe: $ brew uninstall python3 $ brew install python3 -- https://mail.python.org/mailman/listinfo/python-list

Re: pip3 : command not found

2016-10-30 Thread Ben Finney
Vishal Subbiah writes: > Hi, (Please don't top-post in responses. Instead, post your responses interleaved with only the quoted material you are responding to https://en.wikipedia.org/wiki/Posting_style#Interleaved_style>.) > Thanks Ben for the response. I followed your suggestion and this is >

Re: pip3 : command not found

2016-10-30 Thread Chris Angelico
On Mon, Oct 31, 2016 at 12:15 PM, Vishal Subbiah wrote: > "python3 -m pip install LoremIpsum > /usr/local/opt/python3/bin/python3.5: No module named pip" > > How do I fix this? This is the one that ought to work. Something's gone wrong with the installation; as part of the install of recent Pytho

Re: pip3 : command not found

2016-10-30 Thread Vishal Subbiah
Hi, Thanks Ben for the response. I followed your suggestion and this is what i get: "python3 -m pip3 install LoremIpsum /usr/local/opt/python3/bin/python3.5: No module named pip3" "python3 -m pip install LoremIpsum /usr/local/opt/python3/bin/python3.5: No module named pip" How do I fix this? R

Re: pip3 : command not found

2016-10-30 Thread Ben Finney
Vishal Subbiah writes: > So I wads trying to install some packages for python3. when I run pip3 > in terminal There is no guarantee that a command named ‘pip3’ will be installed. Instead, you should invoke the exact Python interpreter you want – and, by extension, the Python environment into wh

pip3 : command not found

2016-10-30 Thread Vishal Subbiah
Hi, So I wads trying to install some packages for python3. when I run pip3 in terminal i receive the error "pip3 : command not found". When looking at the path, I noticed /usr/local/Cellar/python3/3.5.2_3 does not have pip3 in the directory while /usr/local/Cellar/python3/3.5.2_2 does have. I am g

Re: comapring 2 sequences of DNA ouput the silent and non mutations

2016-10-30 Thread Maxime S
2016-10-29 21:38 GMT+02:00 : > > Code: > > [...] > > for i in range (len(protein) & len(seq1)) : > > if protein[i] != mutantPRO[i] : >print (protein[i] + str(i) + mutantPRO[i]) >A+= 1 > else: > if seq1[i:i+3] != mutant[i:i+3]: >