Python Forum
Help with calling the function as the code keep firing
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with calling the function as the code keep firing
#6
(May-03-2018, 06:36 PM)ThiefOfTime Wrote: Ok I see what you mean. You are currently using recursion but if your videos can't play you keep on trying and will not find an end. When you know that you after you check the last url you will not find a video, I would suggest a loop. is there a way for you to check if a link is down, besides trying to play it? maybe search for the file, url or anything?
if you can check this on the forehand, try iterating until your self.count reaches the maximum, until you find a working url. if you find an url start playing the video.
Mainly I would not use the recursion

I am glad you get what I mean. Yes I am currently using recursion. I am trying to find the link that are alive so I can start play the video.

I can change my code to use a loop instead. Can you please post an example how I can use the loop instead of recursion?
Reply


Messages In This Thread
RE: Help with calling the function as the code keep firing - by chris0147 - May-03-2018, 06:42 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  calling external function with arguments Wimpy_Wellington 6 2,866 Jul-05-2023, 06:33 PM
Last Post: deanhystad
  Calling a function (which accesses a library) from another file mouse9095 4 4,103 Jun-07-2023, 08:55 PM
Last Post: deanhystad
Sad Iterate randint() multiple times when calling a function Jake123 2 3,333 Feb-15-2022, 10:56 PM
Last Post: deanhystad
  Calling a class from a function jc4d 5 2,857 Dec-17-2021, 09:04 PM
Last Post: ndc85430
  [Solved] TypeError when calling function Laplace12 2 3,829 Jun-16-2021, 02:46 PM
Last Post: Laplace12
  Putting code into a function breaks its functionality, though the code is identical! PCesarano 1 2,780 Apr-05-2021, 05:40 PM
Last Post: deanhystad
  calling a function and argument in an input phillup7 3 3,360 Oct-25-2020, 02:12 PM
Last Post: jefsummers
  Function Recognises Variable Without Arguments Or Global Variable Calling. OJGeorge4 1 3,010 Apr-06-2020, 09:14 AM
Last Post: bowlofred
  Calling DLL function OptoBruh 0 2,077 Nov-15-2019, 11:51 PM
Last Post: OptoBruh
  Duplicate output when calling a custom function from the same file? road2knowledge 2 3,676 May-10-2019, 07:58 AM
Last Post: road2knowledge

Forum Jump:

User Panel Messages

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