Re: [Tutor] A required question

2018-11-25 Thread Asokan Pichai
On Sat, Nov 24, 2018, 14:33 Avi Gross David, > > As I suspected. Yes, I am aware how to do those things. Just wondered if > anyone automated the process so a fairly simple interface worked. > Does the requirements.txt file (associated with pip IIRC) does most of what you want? > > I am dropping t

Re: [Tutor] Issue in using "subprocess.Popen" for parsing the command output

2018-11-25 Thread Cameron Simpson
On 26Nov2018 09:03, Steven D'Aprano wrote: On Sun, Nov 25, 2018 at 10:43:10PM +0530, srinivasan wrote: 1. Am trying to improve the below code with "try" and "exception", could you please help me how "try" and "exception" can be used on the below code snippet. I hope in my code with try and exc

Re: [Tutor] Issue in using "subprocess.Popen" for parsing the command output

2018-11-25 Thread Steven D'Aprano
I think you are sending email using Gmail. If so, there is a command in Gmail to send only PLAIN TEXT with no added formatting. Please use it. Your code at the moment has extra asterisks * added at the beginning and end of each line. More comments below. On Sun, Nov 25, 2018 at 10:43:10PM +05

Re: [Tutor] Issue in using "subprocess.Popen" for parsing the command output

2018-11-25 Thread Mats Wichmann
On 11/25/18 10:58 AM, srinivasan wrote: > Even only with "*proc.decode("utf-8")"* in the above code still it seems to > throw the error > > #return proc.strip().decode("utf-8") > #return proc.decode("utf-8").strip() > *return proc.decode("utf-8")* > > Error: > /home/srinivasan/Downloa

Re: [Tutor] Issue in using "subprocess.Popen" for parsing the command output

2018-11-25 Thread srinivasan
Even only with "*proc.decode("utf-8")"* in the above code still it seems to throw the error #return proc.strip().decode("utf-8") #return proc.decode("utf-8").strip() *return proc.decode("utf-8")* Error: /home/srinivasan/Downloads/wifidisconnectissuenov23_homework/venv/bin/python /home

[Tutor] Issue in using "subprocess.Popen" for parsing the command output

2018-11-25 Thread srinivasan
Dear Python Experts Team, As am newbie still learning the python syntax from past 2 weeks, Excuse me, If this might be silly question, As I am trying to execute shell command (ie, nmcli) using "subprocess.Popen". 1. Am trying to improve the below code with "try" and "exception", could you please