def abfProtocol(fname):
f=open(fname,'<STR_LIT:rb>')<EOL>raw=f.read(<NUM_LIT:30>*<NUM_LIT:1000>) <EOL>f.close()<EOL>raw=raw.decode("<STR_LIT:utf-8>","<STR_LIT:ignore>")<EOL>raw=raw.split("<STR_LIT>")[<NUM_LIT:1>].split("<STR_LIT>")[<NUM_LIT:0>]<EOL>protocol = os.path.basename(raw) <EOL>protocolID = protocol.split("<STR_LIT:U+0020>")[<NUM_LIT:0>] <EOL>return protocolID<EOL>
Determine the protocol used to record an ABF file