INNER CODE UNIT · Python

read_arguments

jptsantossilva/BEC · bec/main.py:54

def read_arguments():
    # total arguments
    n = len(sys.argv)

    if n < 2:
        print("Argument is missing")
        time_frame = input("Enter time frame (15m, 1d, 4h or 1h):")
        # run_mode = input('Enter run mode (test, prod):')
    else:
        # argv[0] in Python is always the name of the script.
        time_frame = sys.argv[1]

        # run modes
        # test - does not execute orders on the exchange
        # prod - execute orders on the exchange
        # run_mode = sys.argv[2]

    return time_frame  # , run_mode

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…