0
a=subprocess.Popen(['python3 part.py'], shell=True)
a.communicate(m.text)
if run_second_bot==True:
    a.communicate(m.text)
else:
    a.communicate(b.text)

I use to sign in to telegram from other script, but this way block the main script in first line, and other lines did not written, my Operating system is Ubuntu. I use os.system() it also block my main script.

Is there any way to run 2 script in 2 different terminals or screens ?

2
  • Does this answer your question? Python: execute a long script without block the main process Commented May 18, 2021 at 12:42
  • yeah but FileNotFoundError: [Errno 2] No such file or directory: it give me this error , how can i get the path to popen Commented May 18, 2021 at 12:59

0

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.