Jan-19-2019, 10:17 PM
Good Evening,
I am looking to get some help as programming is not my game, I am into networking.
To explain intentions:
This code is being used locally at home on a device that is not connected to the internet. This code is being used for a PlayStation 4 Competitive Basketball team to automate play calling. I will attach what I have at the present time, it is working code, but needs to be regenerated/re-executed each time I want to see a new play. I would like the script to run on like a 30 to 60 second timer until I stop the program.
I am looking to get some help as programming is not my game, I am into networking.
To explain intentions:
This code is being used locally at home on a device that is not connected to the internet. This code is being used for a PlayStation 4 Competitive Basketball team to automate play calling. I will attach what I have at the present time, it is working code, but needs to be regenerated/re-executed each time I want to see a new play. I would like the script to run on like a 30 to 60 second timer until I stop the program.
import random def random_line(pname): lines = open(pname).read().splitlines() return random.choice(lines) print(random_line('listofplays.txt'))
Output:Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 22:20:52) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>>
RESTART: C:\Users\HOUSTONE\Desktop\NBA2K Play Calling Script\playcallscript.py
Pick & Roll (1/3) (HARD)
>>>
RESTART: C:\Users\HOUSTONE\Desktop\NBA2K Play Calling Script\playcallscript.py
Pick & Pop (1/4) (SOFT)
>>>
RESTART: C:\Users\HOUSTONE\Desktop\NBA2K Play Calling Script\playcallscript.py
Pick & Pop (1/4) (HARD)
>>>
Any help is greatly appreciated!!!