EEPROM programmer works with serial monitor but not with pySerial
I figured out the problem. The for loop was writing one byte at a time, which probably wasn't fast enough and caused a timeout in the arudino. The code is now:
page = 0
for x in range(128): # 128 pages in 32K eeprom
    datalst = []
    for i in range(256):
        datalst.append(data[(page * 256) + i])
        
    ser.write(datalst)

    #wait until receive 's' from arduino
    while True:
        if ser.in_waiting &gt; 0:
            suc = ser.read(size=1)
            if suc == b's':
                print(&quot;Success&quot;)
                break
            
    page += 1

I also changed the data types in the arduino sketch to use the ones in stdint.h which solved an unrelated bug. Let me know if I should post the full code for both.