def progressbar(njobs, finished, msg="<STR_LIT>", spacer="<STR_LIT:U+0020>"):
if njobs:<EOL><INDENT>progress = <NUM_LIT:100>*(finished / float(njobs))<EOL><DEDENT>else:<EOL><INDENT>progress = <NUM_LIT:100><EOL><DEDENT>hashes = '<STR_LIT:#>'*int(progress/<NUM_LIT>)<EOL>nohash = '<STR_LIT:U+0020>'*int(<NUM_LIT:20>-len(hashes))<EOL>if not ipyrad.__interactive__:<EOL><INDENT>msg = msg.rsplit("<STR_LIT:|>", <NUM_LIT:2>)[<NUM_LIT:0>]<EOL><DEDENT>args = [spacer, hashes+nohash, int(progress), msg]<EOL>print("<STR_LIT>".format(*args), end="<STR_LIT>")<EOL>sys.stdout.flush()<EOL>
prints a progress bar