[pyglet] push by winstonw...@gmail.com - Adjust make.py usage message. on 2012-08-03 22:24 GMT

10 views
Skip to first unread message

pyg...@googlecode.com

unread,
Aug 3, 2012, 6:24:35 PM8/3/12
to pyglet-...@googlegroups.com
Revision: 49cf0fc08fe6
Author: Winston W <wins...@stratolab.com>
Date: Fri Aug 3 15:23:48 2012
Log: Adjust make.py usage message.
http://code.google.com/p/pyglet/source/detail?r=49cf0fc08fe6

Modified:
/make.py

=======================================
--- /make.py Sat Jun 23 22:11:39 2012
+++ /make.py Fri Aug 3 15:23:48 2012
@@ -24,12 +24,15 @@

webbrowser.open('file://'+op.abspath(DOC_DIR)+'/_build/html/index.html')

if __name__=='__main__':
- avail_cmds = dict(filter(lambda (k,v): not k.startswith('_') and
inspect.isfunction(v),
+ avail_cmds = dict(filter(lambda (k,v): not k.startswith('_')
+ and inspect.isfunction(v)
+ and v.__module__ == '__main__',
locals().items()))
try:
cmd = avail_cmds[sys.argv[1]]
except Exception, exc:
print type(exc).__name__, ':', exc
print 'Usage:', op.basename(sys.argv[0]), '<command>'
- print 'where commands are:', ', '.join(avail_cmds)
- cmd()
+ print ' where commands are:', ', '.join(avail_cmds)
+ else:
+ cmd()
Reply all
Reply to author
Forward
0 new messages