embl parser: information display about progress when parsing multiple
files
This commit is contained in:
@ -169,9 +169,12 @@ def emblIterator_dir(dir_path,
|
||||
):
|
||||
path = dir_path
|
||||
read = 0
|
||||
for filename in glob.glob(os.path.join(path, b'*.dat*')):
|
||||
read_files = 0
|
||||
files = [filename for filename in glob.glob(os.path.join(path, b'*.dat*'))]
|
||||
for filename in files:
|
||||
if read==only:
|
||||
return
|
||||
print("Parsing file %s (%d/%d)" % (tostr(filename), read_files, len(files)))
|
||||
f = uopen(filename)
|
||||
if only is not None:
|
||||
only_f = only-read
|
||||
@ -180,6 +183,7 @@ def emblIterator_dir(dir_path,
|
||||
for seq in emblIterator_file(f, skip=skip, only=only_f, buffersize=buffersize):
|
||||
yield seq
|
||||
read+=1
|
||||
read_files+=1
|
||||
|
||||
|
||||
def emblIterator(obj,
|
||||
|
Reference in New Issue
Block a user