Jan-22-2020, 02:31 AM
Hi I'm no coder I'm teaching my self python just for the fun of it. So forgive me if the is a ridiculous question but here goes.
What I'm trying to do is have one program open another in terminal. I came up with something that works, but the terminal window closes as soon as you enter a input. If I open the my_file Program manually in Terminal I can make as may entries as I wish, but if I use starter.py the window closes after the first entry.
This is the starter.py
Oh if it makes a difference I'm a Linux user ubuntu to be precise.
Thanks for any help
What I'm trying to do is have one program open another in terminal. I came up with something that works, but the terminal window closes as soon as you enter a input. If I open the my_file Program manually in Terminal I can make as may entries as I wish, but if I use starter.py the window closes after the first entry.
This is the starter.py
#!/usr/bin/python3 import subprocess subprocess.run(["gnome-terminal","--","my_file"])This is my_file.py
#!/usr/bin/python while True: ds= str(input())These obviously are not the programs I'm working on, they are just to demonstrate what I'm talking about.
Oh if it makes a difference I'm a Linux user ubuntu to be precise.
Thanks for any help
