Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d81d534

Browse files
committed
A bit of tweakage of the --help and --version options
1 parent 615a66a commit d81d534

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

Tools/audiopy/audiopy

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#! /usr/bin/env python
22

3-
"""Program to control the Solaris audio device.
3+
"""audiopy -- a program to control the Solaris audio device.
44
5-
Author: Barry Warsaw
6-
5+
Author: Barry Warsaw
6+
7+
Version: %(__version__)s
78
89
When no arguments are given, this pops up a graphical window which lets you
910
choose the audio input and output devices.
@@ -46,7 +47,7 @@ from SUNAUDIODEV import *
4647
# Milliseconds between interrupt checks
4748
KEEPALIVE_TIMER = 500
4849

49-
__version__ = '1.0'
50+
__version__ = '0.1'
5051

5152

5253

@@ -280,7 +281,7 @@ class MainWindow:
280281

281282

282283
def usage(msg='', code=1):
283-
print __doc__
284+
print __doc__ % globals()
284285
print msg
285286
sys.exit(code)
286287

@@ -320,7 +321,11 @@ def main():
320321
usage(code=0)
321322
# does not return
322323
elif arg in ('-v', '--version'):
323-
print 'audiopy version', __version__
324+
print '''\
325+
audiopy -- a program to control the Solaris audio device.
326+
Author: Barry Warsaw
327+
328+
Version: %s''' % __version__
324329
sys.exit(0)
325330
for long, short, io, mask in options:
326331
if arg in (long, short):

0 commit comments

Comments
 (0)