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

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -