A little more tweakage
This commit is contained in:
parent
2858b43613
commit
3fe1b14c96
|
@ -1,4 +1,8 @@
|
||||||
"""Pynche: The PYthon Natural Color and Hue Editor.
|
"""Pynche -- The PYthon Natural Color and Hue Editor.
|
||||||
|
|
||||||
|
Author: Barry Warsaw
|
||||||
|
Email: bwarsaw@python.org
|
||||||
|
Version: %(__version__)s
|
||||||
|
|
||||||
Pynche is based largely on a similar color editor I wrote years ago for the
|
Pynche is based largely on a similar color editor I wrote years ago for the
|
||||||
Sunview window system. That editor was called ICE: the Interactive Color
|
Sunview window system. That editor was called ICE: the Interactive Color
|
||||||
|
@ -12,7 +16,7 @@ This program currently requires Python 1.5 with Tkinter. It has only been
|
||||||
tested on Solaris 2.6. Feedback is greatly appreciated. Send email to
|
tested on Solaris 2.6. Feedback is greatly appreciated. Send email to
|
||||||
bwarsaw@python.org
|
bwarsaw@python.org
|
||||||
|
|
||||||
Usage: %(PROGRAM)s [-d file] [-i file] [-X] [-h] [initialcolor]
|
Usage: %(PROGRAM)s [-d file] [-i file] [-X] [-v] [-h] [initialcolor]
|
||||||
|
|
||||||
Where:
|
Where:
|
||||||
--database file
|
--database file
|
||||||
|
@ -32,6 +36,10 @@ Where:
|
||||||
Ignore the initialization file when starting up. Pynche will still
|
Ignore the initialization file when starting up. Pynche will still
|
||||||
write the current option settings to this file when it quits.
|
write the current option settings to this file when it quits.
|
||||||
|
|
||||||
|
--version
|
||||||
|
-v
|
||||||
|
print the version number
|
||||||
|
|
||||||
--help
|
--help
|
||||||
-h
|
-h
|
||||||
print this message
|
print this message
|
||||||
|
@ -71,7 +79,7 @@ RGB_TXT = [
|
||||||
def usage(status, msg=''):
|
def usage(status, msg=''):
|
||||||
print __doc__ % globals()
|
print __doc__ % globals()
|
||||||
if msg:
|
if msg:
|
||||||
print msg
|
print msg
|
||||||
sys.exit(status)
|
sys.exit(status)
|
||||||
|
|
||||||
|
|
||||||
|
@ -156,8 +164,8 @@ def main():
|
||||||
try:
|
try:
|
||||||
opts, args = getopt.getopt(
|
opts, args = getopt.getopt(
|
||||||
sys.argv[1:],
|
sys.argv[1:],
|
||||||
'hd:i:X',
|
'hd:i:Xv',
|
||||||
['database=', 'initfile=', 'ignore', 'help'])
|
['database=', 'initfile=', 'ignore', 'help', 'version'])
|
||||||
except getopt.error, msg:
|
except getopt.error, msg:
|
||||||
usage(1, msg)
|
usage(1, msg)
|
||||||
|
|
||||||
|
@ -173,6 +181,13 @@ def main():
|
||||||
for opt, arg in opts:
|
for opt, arg in opts:
|
||||||
if opt in ('-h', '--help'):
|
if opt in ('-h', '--help'):
|
||||||
usage(0)
|
usage(0)
|
||||||
|
elif opt in ('-v', '--version'):
|
||||||
|
print '''\
|
||||||
|
Pynche -- The PYthon Natural Color and Hue Editor.
|
||||||
|
Author: Barry Warsaw
|
||||||
|
Email: bwarsaw@python.org
|
||||||
|
Version: %s''' % __version__
|
||||||
|
sys.exit(0)
|
||||||
elif opt in ('-d', '--database'):
|
elif opt in ('-d', '--database'):
|
||||||
RGB_TXT.insert(0, arg)
|
RGB_TXT.insert(0, arg)
|
||||||
elif opt in ('-X', '--ignore'):
|
elif opt in ('-X', '--ignore'):
|
||||||
|
|
Loading…
Reference in New Issue