fret669
February 8th, 2011, 07:18 PM
I've been trying to learn how to make gtk applications with python and glade, and so far so good. My issue is with the subprocess module. I am trying to run mkisofs in a sub process, and use 2 python variables as the input, and output of the process. I've tried every way I've found online, and it doesn't work.
class Iso():
"""Runs mkisofs"""
def __init__(self, inFile, outFile):
print '\nread:'
proc = subprocess.Popen(['mkisofs', '-o', outFile, inFile],
shell=True,
stdout=subprocess.PIPE,
)
stdout_value = proc.communicate()[0]
print '\tstdout:', repr(stdout_value)
mkisofs is telling me "missing pathspec", but I'm giving it the input and output file paths.
So, just in case I haven't made clear what I want to do... I want my python variables to be used as arguments for mkisofs. Any help will be greatly appreciated :D
class Iso():
"""Runs mkisofs"""
def __init__(self, inFile, outFile):
print '\nread:'
proc = subprocess.Popen(['mkisofs', '-o', outFile, inFile],
shell=True,
stdout=subprocess.PIPE,
)
stdout_value = proc.communicate()[0]
print '\tstdout:', repr(stdout_value)
mkisofs is telling me "missing pathspec", but I'm giving it the input and output file paths.
So, just in case I haven't made clear what I want to do... I want my python variables to be used as arguments for mkisofs. Any help will be greatly appreciated :D