i have a text in variable called myText, and I want to run command like this:
myText = "This is my text"
call("echo" + myText + " | mail username -s subj")
it means that I want to echo the text in myText and pass is to mail command thru pipe. what is right way to do this ?
from subprocess import call? If so, all you're missing is to surroundmyTextwith quotes, likecall("echo '" + myText + "' | mail username -s subj")