0

I am trying to write a wrapper for RUST game server using python and starting it with subprocess, it works problem is console output is all over the window only top line gets updated on stdout.

I am not reading and printing stdout as for some reason program (RustDedicated) wont accept stdin to write console commands.

How can i run RustDedicated.exe inside the wrapper the way batch file does so console gets displayed correctly?

Expected console output: output Console output i am getting: output

The code:

args = f'{server} -batchmode {serverConfig}'
subprocess.call(args, shell=False)

Note: server referrs to RustDedicated.exe's location, args are just additional server arguments.

Thanks in advance, also developer.valvesoftware.com/wiki/Rust_Dedicated_Server not the programming language.

6
  • may I ask why unity tag? Commented Apr 13, 2022 at 16:02
  • RUST is based upon unity3d, i thought it way have something to do with it. Commented Apr 13, 2022 at 16:03
  • Does this answer your question? Python capture subprocess output Commented Apr 13, 2022 at 16:05
  • rust programming language based in unity, which is a game engine? I dont think that makes any sense, does it? Commented Apr 13, 2022 at 16:06
  • @rustyBucketBay developer.valvesoftware.com/wiki/Rust_Dedicated_Server Commented Apr 13, 2022 at 16:07

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.