mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
docstring(): Function for returning __doc__ % globals()
This commit is contained in:
parent
f622a33b29
commit
d0e1e51385
1 changed files with 6 additions and 1 deletions
|
@ -53,6 +53,7 @@ __version__ = '0.1'
|
|||
|
||||
import sys
|
||||
import os
|
||||
import string
|
||||
import getopt
|
||||
import ColorDB
|
||||
from PyncheWidget import PyncheWidget
|
||||
|
@ -76,8 +77,12 @@ RGB_TXT = [
|
|||
|
||||
|
||||
|
||||
def docstring():
|
||||
return string.rstrip(__doc__ % globals())
|
||||
|
||||
|
||||
def usage(status, msg=''):
|
||||
print __doc__ % globals()
|
||||
print docstring()
|
||||
if msg:
|
||||
print msg
|
||||
sys.exit(status)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue