简体   繁体   中英

How to read and write to a python program through vb.net

I am currently making a GUI for Minecraft Coder Pack. MCP works off a system of batch files that launch python programs. I want to be able to read and write to these cmd windows throught vb.net. So that I can tell when a process has finished or to answer a yes, no question i nthe python program, with a gui from vb.net An example of the batch launch code is

    @echo off
runtime\bin\python\python_mcp runtime\cleanup.py %*
pause

Any ideas on how to do this?

You may be able to write from vb.net to a text file (input.txt, for example), then use "<" to use input.txt for input on the command line and ">" to send the command line output to another file (output.txt, for example). Then you can read output.txt from vb.net.

runtime\bin\python\python_mcp zruntime\cleanup.py %* < input.txt > output.txt

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM