For some reason, when I try to add the following line of code, I get an error:
p = subprocess.Popen("df -Pk -m -xtmpfs -xdevtmpfs", stdout=PIPE, shell=True).stdout
I initially had code that used os instead, but that didn't work either.
As the code runs fine in the Interactive Shell, the only thing I could think of is that I'm importing the module incorrectly. I'm not entirely sure where this script is running from, but I'm importing normally with:
import os
import subprocess
from subprocess import Popen, PIPE, STDOUT
Should I try moving the modules to a different folder such as the paepy folder? Is it actually an import issue?
Also, I always get the PE233 error no matter what, syntax error, return error, print error. Does that hold some significance?
Add comment