MCPcopy
hub / github.com/Gallopsled/pwntools / progress

Method progress

pwnlib/log.py:301–324  ·  view source on GitHub ↗

progress(message, status = '', *args, level = logging.INFO, **kwargs) -> Progress Creates a new progress logger which creates log records with log level `level`. Progress status can be updated using :meth:`Progress.status` and stopped using :meth:`Progress.success`

(self, message, status = '', *args, **kwargs)

Source from the content-addressed store, hash-verified

299 self._logger.log(level, msg, *args, **kwargs)
300
301 def progress(self, message, status = '', *args, **kwargs):
302 """progress(message, status = '', *args, level = logging.INFO, **kwargs) -> Progress
303
304 Creates a new progress logger which creates log records with log level
305 `level`.
306
307 Progress status can be updated using :meth:`Progress.status` and stopped
308 using :meth:`Progress.success` or :meth:`Progress.failure`.
309
310 If `term.term_mode` is enabled the progress logger will be animated.
311
312 The progress manager also functions as a context manager. Using context
313 managers ensures that animations stop even if an exception is raised.
314
315 .. code-block:: python
316
317 with log.progress('Trying something...') as p:
318 for i in range(10):
319 p.status("At %i" % i)
320 time.sleep(0.5)
321 x = 1/0
322 """
323 level = self._getlevel(kwargs.pop('level', logging.INFO))
324 return Progress(self, message, status, level, args, kwargs)
325
326 def waitfor(self, *args, **kwargs):
327 """Alias for :meth:`progress`."""

Callers 12

waitforMethod · 0.95
processFunction · 0.80
installFunction · 0.80
uninstallFunction · 0.80
processMethod · 0.80
download_dataMethod · 0.80
download_fileMethod · 0.80
upload_manuallyMethod · 0.80
__init__Method · 0.80
wgetFunction · 0.80
testFunction · 0.80

Calls 3

_getlevelMethod · 0.95
ProgressClass · 0.85
popMethod · 0.45

Tested by

no test coverage detected