I want to open a new cmd and automatically run a method from my original script on the new cmd (while the old cmd is open).
My code so far:
def hello():
print(say_hello)
say_hello = 'hello'
os.system("start cmd.exe")
Now how do I continue from here? I was able to open a new cmd with the line os.system("start cmd.exe")
But dont know how to call the hello() method on the new cmd instantly.
Thanks in advance!