MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / __do_log

Method __do_log

pydevd_attach_to_process/winappdbg/textio.py:1785–1804  ·  view source on GitHub ↗

Writes the given text verbatim into the log file (if any) and/or standard input (if the verbose flag is turned on). Used internally. @type text: str @param text: Text to print.

(self, text)

Source from the content-addressed store, hash-verified

1783 self.fd = None
1784
1785 def __do_log(self, text):
1786 """
1787 Writes the given text verbatim into the log file (if any)
1788 and/or standard input (if the verbose flag is turned on).
1789
1790 Used internally.
1791
1792 @type text: str
1793 @param text: Text to print.
1794 """
1795 if isinstance(text, compat.unicode):
1796 text = text.encode("cp1252")
1797 if self.verbose:
1798 print(text)
1799 if self.logfile:
1800 try:
1801 self.fd.writelines("%s\n" % text)
1802 except IOError:
1803 e = sys.exc_info()[1]
1804 self.__logfile_error(e)
1805
1806 def log_text(self, text):
1807 """

Callers 3

log_textMethod · 0.95
log_eventMethod · 0.95
log_excMethod · 0.95

Calls 1

__logfile_errorMethod · 0.95

Tested by

no test coverage detected