[Nvda-dev] commit r1942 - trunk/source

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Nvda-dev] commit r1942 - trunk/source

NVDA Subversion
Author: mdcurran
Date: Tue Apr 22 09:50:40 2008
New Revision: 1942

nvda.pyw: add doc strings. Remove unneeded imports.


Modified: trunk/source/nvda.pyw
--- trunk/source/nvda.pyw (original)
+++ trunk/source/nvda.pyw Tue Apr 22 09:50:40 2008
@@ -4,12 +4,12 @@
 #This file is covered by the GNU General Public License.
 #See the file COPYING for more details.
+"""The NVDA launcher. It can handle some command-line arguments (including help). It sets up logging, and then starts the core. it also handles the playing of the startup and exit sounds."""
 import logging
 import os
 import sys
-import codecs
 import tempfile
-import ctypes
 import winsound
 import locale
 import gettext
@@ -25,11 +25,14 @@
 class NoConsoleOptionParser(optparse.OptionParser):
+ """A commandline option parser that shows its messages using dialogs,  as this pyw file has no dos console window associated with it"""
  def print_help(self, file=None):
+ """Shows help in a standard Windows message dialog"""
  win32gui.MessageBox(0, self.format_help(), "Help", 0)
  def error(self, msg):
+ """Shows an error in a standard Windows message dialog, and then exits NVDA"""
  out = ""
  if self.usage:
  out = self.get_usage()
@@ -38,6 +41,7 @@
 def abortWithError(code):
+ """Logs a critical error, plays the critical error Windows sound, sets the system screen reader flag back to false, plays the NVDA exit sound, and then exits NVDA"""
  globalVars.log.critical("core stop not due to exit/restart",exc_info=True)