Update of /cvsroot/webware/Webware/bin
In directory usw-pr-cvs1:/tmp/cvs-serv18045/bin
Modified Files:
ReleaseHelper.py checksrc.py pystats.py
Log Message:
Changed doc strings to use ''' instead of """
Index: ReleaseHelper.py
===================================================================
RCS file: /cvsroot/webware/Webware/bin/ReleaseHelper.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ReleaseHelper.py 3 Dec 2001 01:40:03 -0000 1.3
--- ReleaseHelper.py 20 Jun 2002 17:48:23 -0000 1.4
***************
*** 1,4 ****
#!/usr/bin/env python
! '''
Helps with cutting Python releases.
--- 1,4 ----
#!/usr/bin/env python
! """
Helps with cutting Python releases.
***************
*** 26,30 ****
- Using ProperitesObject, this program could suggest a version string
from the Webware version.
! '''
import os, sys, time
--- 26,30 ----
- Using ProperitesObject, this program could suggest a version string
from the Webware version.
! """
import os, sys, time
***************
*** 110,114 ****
def run(self, cmd):
! ''' Runs an arbitrary UNIX command. '''
print 'cmd>', cmd
results = os.popen(cmd).read()
--- 110,114 ----
def run(self, cmd):
! """ Runs an arbitrary UNIX command. """
print 'cmd>', cmd
results = os.popen(cmd).read()
Index: checksrc.py
===================================================================
RCS file: /cvsroot/webware/Webware/bin/checksrc.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** checksrc.py 24 Feb 2001 07:51:42 -0000 1.3
--- checksrc.py 20 Jun 2002 17:48:23 -0000 1.4
***************
*** 1,5 ****
#!/usr/bin/env python
! '''
checksrc.py
--- 1,5 ----
#!/usr/bin/env python
! """
checksrc.py
***************
*** 103,107 ****
Maybe: Experiment with including the name of the last seen method/function with the error messages to help guide the user to where the error occurred.
! '''
--- 103,107 ----
Maybe: Experiment with including the name of the last seen method/function with the error messages to help guide the user to where the error occurred.
! """
***************
*** 165,169 ****
def setDirectory(self, dir):
! ''' Sets the directory that checking starts in. '''
self._directory = dir
--- 165,169 ----
def setDirectory(self, dir):
! """ Sets the directory that checking starts in. """
self._directory = dir
***************
*** 172,176 ****
def setOutput(self, output):
! ''' Sets the destination output which can either be an object which must respond to write() or a string which is a filename used for one invocation of check(). '''
if type(output) is type(''):
self._out = open(output, 'w')
--- 172,176 ----
def setOutput(self, output):
! """ Sets the destination output which can either be an object which must respond to write() or a string which is a filename used for one invocation of check(). """
if type(output) is type(''):
self._out = open(output, 'w')
***************
*** 184,188 ****
def setRecurse(self, flag):
! ''' Sets whether or not to recurse into subdirectories. '''
self._recurse = flag
--- 184,188 ----
def setRecurse(self, flag):
! """ Sets whether or not to recurse into subdirectories. """
self._recurse = flag
***************
*** 191,195 ****
def setVerbose(self, flag):
! ''' Sets whether or not to print extra information during check (such as every directory and file name scanned). '''
self._verbose = flag
--- 191,195 ----
def setVerbose(self, flag):
! """ Sets whether or not to print extra information during check (such as every directory and file name scanned). """
self._verbose = flag
***************
*** 198,202 ****
def readArgs(self, args=sys.argv):
! ''' Reads a list of arguments in command line style (e.g., sys.argv). You can pass your own args if you like, otherwise sys.argv is used. Returns 1 on success; 0 otherwise. '''
setDir = setOut = 0
for arg in args[1:]:
--- 198,202 ----
def readArgs(self, args=sys.argv):
! """ Reads a list of arguments in command line style (e.g., sys.argv). You can pass your own args if you like, otherwise sys.argv is used. Returns 1 on success; 0 otherwise. """
setDir = setOut = 0
for arg in args[1:]:
***************
*** 263,267 ****
def write(self, *args):
! ''' Invoked by self for all printing so that output can be easily redirected. '''
write = self._out.write
for arg in args:
--- 263,267 ----
def write(self, *args):
! """ Invoked by self for all printing so that output can be easily redirected. """
write = self._out.write
for arg in args:
***************
*** 269,273 ****
def error(self, msgCode, args):
! ''' Invoked by self when a source code error is detected. Prints the error message and it's location. Does not raise exceptions or halt the program. '''
# Implement the DisableErrors option
--- 269,273 ----
def error(self, msgCode, args):
! """ Invoked by self when a source code error is detected. Prints the error message and it's location. Does not raise exceptions or halt the program. """
# Implement the DisableErrors option
***************
*** 282,291 ****
def fatalError(self, msg):
! ''' Reports a fatal error such as an invalid configuration file and raises CheckSrcError. '''
self.write('FATAL ERROR: %s\n' % msg)
raise CheckSrcError
def location(self):
! ''' Returns a string indicating the current location such as "fileName:lineNum:charNum". The string may be shorter if the latter components are undefined. '''
s = ''
if self._fileName!=None:
--- 282,291 ----
def fatalError(self, msg):
! """ Reports a fatal error such as an invalid configuration file and raises CheckSrcError. """
self.write('FATAL ERROR: %s\n' % msg)
raise CheckSrcError
def location(self):
! """ Returns a string indicating the current location such as "fileName:lineNum:charNum". The string may be shorter if the latter components are undefined. """
s = ''
if self._fileName!=None:
***************
*** 300,304 ****
def printDir(self):
! ''' Self utility method to print the directory being processed. '''
self.write('\n', self._dirName, '\n')
self._printedDir = 1
--- 300,304 ----
def printDir(self):
! """ Self utility method to print the directory being processed. """
self.write('\n', self._dirName, '\n')
self._printedDir = 1
***************
*** 348,352 ****
def checkDir(self, arg, dirName, names):
! ''' Invoked by os.path.walk() which is kicked off by check(). Recursively checks the given directory and all it's subdirectories. '''
# Initialize location attributes.
# These are updated while processing and
--- 348,352 ----
def checkDir(self, arg, dirName, names):
! """ Invoked by os.path.walk() which is kicked off by check(). Recursively checks the given directory and all it's subdirectories. """
# Initialize location attributes.
# These are updated while processing and
Index: pystats.py
===================================================================
RCS file: /cvsroot/webware/Webware/bin/pystats.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** pystats.py 12 Oct 2000 14:28:59 -0000 1.1
--- pystats.py 20 Jun 2002 17:48:23 -0000 1.2
***************
*** 1,5 ****
#!/usr/bin/env python
! '''
pystats.py
--- 1,5 ----
#!/usr/bin/env python
! """
pystats.py
***************
*** 56,60 ****
Py 2.0: Use dict.setdefault() & +=
! '''
--- 56,60 ----
Py 2.0: Use dict.setdefault() & +=
! """
***************
*** 80,84 ****
def copy(self):
! ''' Returns a real copy/duplicate of the receiver. (Note that userDict.copy() will do so, but subclassOfUserDict.copy() does not.) '''
return self.__class__(self.data)
--- 80,84 ----
def copy(self):
! """ Returns a real copy/duplicate of the receiver. (Note that userDict.copy() will do so, but subclassOfUserDict.copy() does not.) """
return self.__class__(self.data)
***************
*** 88,92 ****
def Stats_writeHeaders(nameWidth, file=sys.stdout):
! ''' This would be a class method in other OO languages: Stats.writeHeaders(). '''
file.write(' '*nameWidth)
for name in Stats.statNames:
--- 88,92 ----
def Stats_writeHeaders(nameWidth, file=sys.stdout):
! """ This would be a class method in other OO languages: Stats.writeHeaders(). """
file.write(' '*nameWidth)
for name in Stats.statNames:
***************
*** 182,186 ****
def setDirectory(self, dir):
! ''' Sets the directory that checking starts in. '''
self._directory = dir
--- 182,186 ----
def setDirectory(self, dir):
! """ Sets the directory that checking starts in. """
self._directory = dir
***************
*** 195,199 ****
def setRecurse(self, flag):
! ''' Sets whether or not to recurse into subdirectories. '''
self._recurse = flag
--- 195,199 ----
def setRecurse(self, flag):
! """ Sets whether or not to recurse into subdirectories. """
self._recurse = flag
***************
*** 208,212 ****
def setVerbose(self, flag):
! ''' Sets whether or not to print extra information during check (such as every directory and file name scanned). '''
self._verbose = flag
--- 208,212 ----
def setVerbose(self, flag):
! """ Sets whether or not to print extra information during check (such as every directory and file name scanned). """
self._verbose = flag
|