0

I want to, from a python script, open a new terminal window. Then, on that new window, run another python script, located on the same directory. I needs to be on another window, because both scripts have while True loops, and I need them to run simultaneously. How would I do that? Thanks everyone!

1
  • Do you have any sample code so far? Commented Apr 14, 2014 at 4:42

1 Answer 1

1

You can just spawn an xterm with the python code used:

xterm -e "python /path/to/your/file.py"

This will close when the process ends.

If you need to, you can do this from inside a python script using the subprocess module (https://docs.python.org/2/library/subprocess.html).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.