开发者

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


  1. Find where in the msys path libgcc_s_dw2-1.dll is.
  2. Find the environmental variable in MSYS that has that path in it.
  3. Add that environmental variable to Windows.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜