Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
add interrupt for next task
#1
hi, sorry for my bad English,
I try to make auto "convert" using FFmpeg,
this is the sample code:
import glob
import os
import time
def DoSomethingToTheFile(file):
    #it does nothing, just pretend it does
    print("doing something to",file,"using FFMPEG")
    time.sleep(10)
path = os.getcwd()
files = glob.glob(path + '/**.mp4', recursive=True)
for file in files:
    DoSomethingToTheFile(file)
my problem is sometimes I like to stop the code after the current FFMPEG has done,
I like to add a feature: continue mode(default) and break mode,
how to do this?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Determine if keyboard interrupt versus SIGINT trapped? Jibunnokage 5 1,807 Sep-30-2022, 06:54 AM
Last Post: Gribouillis
  count certain task in task manager[solved] kucingkembar 2 1,132 Aug-29-2022, 05:57 PM
Last Post: kucingkembar
  Schedule a task and render/ use the result of the task in any given time klllmmm 2 2,109 May-04-2021, 10:17 AM
Last Post: klllmmm
  Enabling interrupt on Adafruits button/led board Moris526 0 2,026 Apr-30-2021, 03:29 PM
Last Post: Moris526
  python delay without interrupt the whole code Nick_tkinter 4 5,173 Feb-22-2021, 10:51 PM
Last Post: nilamo
  How to create a task/import a task(task scheduler) using python Tyrel 7 3,757 Feb-11-2021, 11:45 AM
Last Post: Tyrel
  Adafruits Neotrellis interrupt with RAsp and Python Moris526 5 3,590 Jan-01-2021, 11:43 PM
Last Post: Moris526
  Interrupt for Adafruits Neotrellis button/led board Moris526 0 1,812 Dec-28-2020, 05:42 AM
Last Post: Moris526
  input interrupt Nickd12 1 4,279 Dec-09-2020, 05:01 PM
Last Post: Gribouillis
  Interrupt/Break Function sdprelude 2 6,061 Feb-17-2017, 12:19 AM
Last Post: Ofnuts

Forum Jump:

User Panel Messages

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