added EOF tag

This commit is contained in:
q
2016-08-06 13:44:54 +03:00
parent 2cd38b47b7
commit bd5266cbb4

View File

@@ -227,6 +227,7 @@ Outputs:'''.encode('utf-8')
bc=bc() bc=bc()
opts=setup_options() opts=setup_options()
f=open_data_file(opts) f=open_data_file(opts)
endoffile=False
if opts.clear: if opts.clear:
bc.clear() bc.clear()
if opts.test_image: if opts.test_image:
@@ -246,6 +247,10 @@ while True:
row=row.decode('utf-8').rstrip("\n\r") row=row.decode('utf-8').rstrip("\n\r")
if row.startswith(NEWIMAGE): if row.startswith(NEWIMAGE):
break break
if row.startswith(ENDOFFILE):
endoffile=True
if endoffile:
break
if row.startswith(PAUSE): if row.startswith(PAUSE):
try: try:
new_value=row[len(PAUSE):].strip() new_value=row[len(PAUSE):].strip()