state_machine_emulator/main.py
def process_file_pin_program(filename):
    """ read the pin program file and parse it """
    pin_program = list()
    with open(filename, 'r') as pin_program_file:
        line = pin_program_file.readline()
        while line:
            # only process lines without comments
            if '#' not in line:
                parts = line.split(',')
                parts[0] = int(parts[0])
                parts[2] = int(parts[2])
                pin_program.append(parts)
            line = pin_program_file.readline()
    return pin_program
 read the pin program file and parse it 
read the pin program file and parse it
read the pin program file and parse it
def process_file_pin_program(filename):
    pin_program = list()
    with open(filename, 'r') as pin_program_file:
        line = pin_program_file.readline()
        while line:
            if '#' not in line:
                parts = line.split(',')
                parts[0] = int(parts[0])
                parts[2] = int(parts[2])
                pin_program.append(parts)
            line = pin_program_file.readline()
    return pin_program
def process_file_pin_program ( filename ) : pin_program = list ( ) with open ( filename , 'r' ) as pin_program_file : line = pin_program_file . readline ( ) while line : if '#' not in line : parts = line . split ( ',' ) parts [ 0 ] = int ( parts [ 0 ] ) parts [ 2 ] = int ( parts [ 2 ] ) pin_program . append ( parts ) line = pin_program_file . readline ( ) return pin_program
read the pin program file and parse it
read the pin program file and parse it
""" read the pin program file and parse it """ # only process lines without comments
filename