Why would:
using PyCall
@pyimport subprocess.call as call_prog
result in:
ERROR: LoadError: PyError (:PyImport_ImportModule) <type 'exceptions.ImportError'>
ImportError('No module named call',)
Why would:
using PyCall
@pyimport subprocess.call as call_prog
result in:
ERROR: LoadError: PyError (:PyImport_ImportModule) <type 'exceptions.ImportError'>
ImportError('No module named call',)
subprocess.call
is a function, not a module, and @pyimport
only works with modules. Just do
call_prog = pyimport("subprocess")["call"]
# then you can do, for example:
call_prog(["ls", "-l"])
call_prog("ls -l", shell=true)
That make sense. Thank you very much.