Hi i can not seem to find out how to put the output of mxmlc file into an output this is wat i have
os.system("mxmlc.exe swick.swc -output location/swiff.swf")
I haven't tried it, but just off the top of my head, would it be worth using a variable to catch whatever value is returned by the system.os call where you're executing mxmlc and then print that value...
Something like this??
mxmlc_output = os.system("mxmlc.exe swick.swc -output location/swiff.swf")
print mxmlc_output
Like I said, I've not tried it; but it might work!
would it be worth using a variable to catch whatever value is returned by the system.os
Nah, os.system just returns the return value.
You'd be better off using a subprocess and read the STDOUT pipe... Additionally, you could add a " > filename.txt" to the end of your command, which will dump the stdout into a file called filename.txt.
ignore that last post...all that does is return a numerical value...Not quite what you were after!
J
Nah, os.system just returns the return value.
You'd be better off using a subprocess and read the STDOUT pipe... Additionally, you could add a " > filename.txt" to the end of your command, which will dump the stdout into a file called filename.txt.
Hmm, yes that would probably be a more sensible idea!
Jas
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.