python - Getstatusoutput function returns a value doesn't work -



python - Getstatusoutput function returns a value doesn't work -

i utilize django application, view.py file phone call changes_to_test2 function, within of config.py file located in different folder view.py.

the code is:

view.py file:

def test1(request): import commands command = "config.py --action=changes_to_test2" (status, output) = commands.getstatusoutput(command) print 'output %s' %output

the print displays:

output sh: config.py: command not found

so never enters other function, suggestions?

python django

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -