Is it possible to name every output of files and display it in one single console?
Let's say I have a main.py
file and a main.java
file, and I want to run them both in one Python script and seperate the outputs by naming them.
Now I have a python file and it should do this:
# run main.py
# run main.java
# when an output is sent from a file, it should be like this:
output = "{} > {}".format(file, output)
# and then print the output.
Let's say the java file would usually display Hello, World!
but here it would be like this in the console: main.java > Hello, World!
Thanks!
EDIT:
- I gave a java and a python file as an example, I just want to name the output of different files, without modifying them.
- I wanted to run them both as a subprocess and display the outputs with names in one console.