On Mon, 31 Oct 2016 11:55:26 -0500, Wildman wrote:
> On Mon, 31 Oct 2016 11:05:23 -0400, Random832 wrote:
>
>> On Mon, Oct 31, 2016, at 10:55, Wildman via Python-list wrote:
>>> I have code using that approach but I am trying to save myself
>>> from having to parse the entire shadow file. Grep w
On 2016-10-31, Wildman via Python-list wrote:
> On Mon, 31 Oct 2016 15:44:13 +1100, Ben Finney wrote:
>> 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 t
On Mon, 31 Oct 2016 11:05:23 -0400, Random832 wrote:
> On Mon, Oct 31, 2016, at 10:55, Wildman via Python-list wrote:
>> I have code using that approach but I am trying to save myself
>> from having to parse the entire shadow file. Grep will do it
>> for me if I can get code right.
>
> Python al
On Mon, 31 Oct 2016 08:13:54 +, Jon Ribbens wrote:
> On 2016-10-31, Wildman 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 pr
On Mon, Oct 31, 2016, at 10:55, Wildman via Python-list wrote:
> I have code using that approach but I am trying to save myself
> from having to parse the entire shadow file. Grep will do it
> for me if I can get code right.
Python already has built-in functions to parse the shadow file.
https:/
On Mon, 31 Oct 2016 09:12:57 +0100, Peter Otten wrote:
> Wildman via Python-list wrote:
>
>> 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
>> perfect
On Mon, 31 Oct 2016 15:44:13 +1100, Ben Finney wrote:
> 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, o
On Mon, 31 Oct 2016 15:31:27 +1100, Chris Angelico wrote:
> 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
>> p
On 2016-10-31, Wildman 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 string. Below is the code I am usi
Wildman via Python-list wrote:
> 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
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’
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
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
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
14 matches
Mail list logo