How can I run a program in msys through Python?
I've got a short python script that will eventually edit an input file, run an executable on that input file and read the output from the executable. The problem is, I've compiled the executable through msys, and can only seem to run it from the msys window. I'm wondering if the easiest way to do this is to somehow use os.command in Python to run msys and pipe a command in, or run a script through msys, but I haven't found a way to do this.
Has anyone tried this before? How would you pipe a command into msys? Or is there a smarter 开发者_如何学运维way to do this that I haven't thought of?
Thanks in advance!
EDIT: Just realized that this information might help, haha . . . . I'm running Windows, msys 1.0 and Python 2.7
- Find where in the msys path
libgcc_s_dw2-1.dll
is. - Find the environmental variable in MSYS that has that path in it.
- Add that environmental variable to Windows.
精彩评论