__init__.py
来自「使用Pygtk写的几个例子」· Python 代码 · 共 26 行
PY
26 行
import os_file_list = [ x for x in os.listdir(os.path.dirname(__file__)) if len(x) > 3 and x[-3:] == '.py']demo_list = []for _mod in _file_list: # Leave underscored Modulnames. if _mod.startswith('_'): continue _mod = _mod[:-3] try: _doc = '' exec 'import ' + _mod + '\n' + \ '_doc = ' + _mod + '.__doc__' _description = _doc.splitlines()[0] demo_list.append((_description, _mod)) except (ImportError, AttributeError), msg: # ImportError or AttributeError (if _doc is None) #print 'failed: ', _mod passdemo_list.sort()
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?