Python Forum
Running multiple script at the same time
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Running multiple script at the same time
#2
You can use threading. Place both scripts in the same folder and write a third script.
In this third script import the other two, lets call them capture and process and assume that they both have a main function.
If they don't have a main function or you have problems making this work, consider posting your code.
from threading import Thread
import capture
import process

capturer = Thread(target=capture.main, daemon=True)
capturer.start()

processor = Thread(target=process.main, daemon=True)
processor.start()
This will start both scripts as individual processes. The will run even if you close the console that launched them.
Reply


Messages In This Thread
RE: Running multiple script at the same time - by Clunk_Head - Dec-07-2019, 04:30 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Using a script to open multiple shells? SuchUmami 9 619 Apr-01-2024, 10:04 AM
Last Post: Gribouillis
  No Internet connection when running a Python script basil_555 8 693 Mar-11-2024, 11:02 AM
Last Post: snippsat
Question Running Python script through Task Scheduler? Winfried 8 573 Mar-10-2024, 07:24 PM
Last Post: Winfried
  Help Running Python Script in Mac OS emojistickers 0 367 Nov-20-2023, 01:58 PM
Last Post: emojistickers
  Trying to make a board with turtle, nothing happens when running script Quascia 3 710 Nov-01-2023, 03:11 PM
Last Post: deanhystad
  Python script running under windows over nssm.exe JaroslavZ 0 738 May-12-2023, 09:22 AM
Last Post: JaroslavZ
  Understanding venv; How do I ensure my python script uses the environment every time? Calab 1 2,331 May-10-2023, 02:13 PM
Last Post: Calab
  Running script with subprocess in another directory paul18fr 1 3,895 Jan-20-2023, 02:33 PM
Last Post: paul18fr
  Multiple.ui windows showing at the same time when I only want to show at a time eyavuz21 4 1,070 Dec-20-2022, 05:14 AM
Last Post: deanhystad
Question Running an action only if time condition is met alexbca 5 1,355 Oct-27-2022, 02:15 PM
Last Post: alexbca

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020