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