0

So, I have two files that does some pretty simple calculations let's say. so if I wanna check if they are working, I open 2 cmds and type their names and they run properly, and it does what I wanted to do.

Now I want to create a main.py, which should help me with this process of opening two new cmds, so what i want to do is run only the main.py file which should by itself open 2 new windows for the file1.py and file2.py .xD

so, here is my main.py ...

import subprocess

subprocess.Popen(["python", r"F:\Coding\python\file1.py"])
subprocess.Popen(["python", r"F:\Coding\python\file2.py"])

What this does is just do the calculations and print in the same window. I want it to open a new cmd. What should I do?

Adith
  • 3
  • 3
  • Does this answer your question? [subprocess.Popen in different console](https://stackoverflow.com/questions/15899798/subprocess-popen-in-different-console) – Tomerikoo Feb 25 '21 at 07:44
  • 3
    Does this answer your question? [Execute terminal command from python in new terminal window?](https://stackoverflow.com/questions/19308415/execute-terminal-command-from-python-in-new-terminal-window) – programandoconro Feb 25 '21 at 07:48

0 Answers0