0

For example if I call ("python3 -m http.server", shell=True). Is there a way to wait until the file is served and then end the subprocess so the script can go on?

  • 1
    are you sure you want that? or do you want the started server to keep running in the background? – Anentropic Jul 27 '22 at 14:25
  • both would be a solution for my problem. i just want the script to go on after the files was served –  Jul 27 '22 at 14:27
  • You probably don't need to run a entire server in a separate process if you want to serve only 1 file a single time. – mousetail Jul 27 '22 at 14:27
  • this answer shows how to call a process in the background https://stackoverflow.com/a/7224186/202168 – Anentropic Jul 27 '22 at 14:31

0 Answers0