Пример #1
0
def random_file_test(request):
    src_dir = '/projects/sign_server/spark/'
    rand_file = random.choice(os.listdir(src_dir))

    #pick random coordinates:
    row = random.randint(0, 12)     #row = 0
    col = random.randint(0, 180)    #most of the way down

    board.write_file_coords(src_dir + rand_file, row, col)
    return HttpResponse(content="Displayed Test " + rand_file)
Пример #2
0
def random_file_test(request):
    src_dir = '/projects/sign_server/spark/'
    rand_file = random.choice(os.listdir(src_dir))

    #pick random coordinates:
    row = random.randint(0, 12)  #row = 0
    col = random.randint(0, 180)  #most of the way down

    board.write_file_coords(src_dir + rand_file, row, col)
    return HttpResponse(content="Displayed Test " + rand_file)
Пример #3
0
def random_fileBoard(foo, bar):
    global random_counter

    logger.warn("randomfile called")

    random_counter = random_counter + 1
    if random_counter > 9:
        random_counter = 0
        board.clear_board(None)
        return
    else:
        src_dir = '/projects/sign_server/spark/'
        rand_file = random.choice(os.listdir(src_dir))
        row = random.randint(0, 4) #all the way down
        col = random.randint(0, 160)    
        board.write_file_coords(src_dir + rand_file, row, col)
Пример #4
0
def random_fileBoard(foo, bar):
    global random_counter

    logger.warn("randomfile called")

    random_counter = random_counter + 1
    if random_counter > 9:
        random_counter = 0
        board.clear_board(None)
        return
    else:
        src_dir = '/projects/sign_server/spark/'
        rand_file = random.choice(os.listdir(src_dir))
        row = random.randint(0, 4)  #all the way down
        col = random.randint(0, 160)
        board.write_file_coords(src_dir + rand_file, row, col)