Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion q.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,17 @@ def add(self, items, sep='', wrap=True):
self.column += size

def __init__(self):
self.writer = self.Writer(self.FileWriter(self.OUTPUT_PATH), self.time)
time = self.time
self.writer = self.Writer(self.FileWriter(self.OUTPUT_PATH), time)
self.indent = 0
# in_console tracks whether we're in an interactive console.
# We use it to display the caller as "<console>" instead of "<module>".
self.in_console = False
startup_msg = time.strftime("\nLogging started at: %c",
time.localtime(time.time()))
if self.writer.color:
startup_msg = self.writer.YELLOW + startup_msg + self.writer.NORMAL
self.writer.file_writer.write('a', startup_msg)

def unindent(self, lines):
"""Removes any indentation that is common to all of the given lines."""
Expand Down