0

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")
3
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by JasonHippy
0

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!

0

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.

0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.