MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / clear

Method clear

pager_lib/tqdm/std.py:1309–1323  ·  view source on GitHub ↗

Clear current bar display.

(self, nolock=False)

Source from the content-addressed store, hash-verified

1307 fp_write('\r')
1308
1309 def clear(self, nolock=False):
1310 """Clear current bar display."""
1311 if self.disable:
1312 return
1313
1314 if not nolock:
1315 self._lock.acquire()
1316 pos = abs(self.pos)
1317 if pos < (self.nrows or 20):
1318 self.moveto(pos)
1319 self.sp('')
1320 self.fp.write('\r') # place cursor back at the beginning of line
1321 self.moveto(-pos)
1322 if not nolock:
1323 self._lock.release()
1324
1325 def refresh(self, nolock=False, lock_args=None):
1326 """

Callers 2

_decr_instancesMethod · 0.45
external_write_modeMethod · 0.45

Calls 4

movetoMethod · 0.95
acquireMethod · 0.80
releaseMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected