From 2d0ba03893b2f3eeac3b9191d3908584730500f3 Mon Sep 17 00:00:00 2001 From: Gra Date: Sat, 25 Apr 2009 10:24:29 +0200 Subject: [PATCH] Reworked docstrings. --- imagecapture.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/imagecapture.py b/imagecapture.py index 7152116..81778d0 100644 --- a/imagecapture.py +++ b/imagecapture.py @@ -101,8 +101,7 @@ class ImageWriter(threading.Thread): self.logger.addHandler(consolehandler) def PrintDebug(self, stuff, exc_info=False): - '''Write stuff to console. - ''' + '''Writes stuff to console.''' self.logger.debug(stuff, exc_info=exc_info) def run(self): @@ -116,9 +115,12 @@ class ImageWriter(threading.Thread): pass def print_event(self, event): - '''prints event. need this because pyhook's event don't have a default __str__ method, - so we check for os type, and make it work on windows. - ''' + '''Prints the event. + + We need this because pyhook's event don't have a default __str__ + method, so we check for os type, and make it work on windows. + + ''' if os.name == 'posix': return str(event) if os.name == 'nt': @@ -174,9 +176,13 @@ class ImageWriter(threading.Thread): return Point(win32api.GetSystemMetrics(0), win32api.GetSystemMetrics (1)) def getProcessName(self, event): - '''Acquire the process name from the event window handle for use in the image filename. - On Linux, process name is a direct attribute of the event. - ''' + '''Get the process name from the event window handle. + + Talking about the event window handle for use in the image filename. + + On Linux, process name is a direct attribute of the event. + + ''' if os.name == 'nt': hwnd = event.Window try: -- 2.45.1