#todo
-------output----------
|
#todo
-------output----------
|
import re
import inspect
print dir(re)
#or use inspect, which is better
print inspect.getmembers(re, inspect.isfunction)
-------output----------
['DEBUG', 'DOTALL', 'I', 'IGNORECASE', 'L', 'LOCALE', 'M', 'MULTILINE', 'S', 'Scanner', 'T', 'TEMPLATE', 'U', 'UNICODE', 'VERBOSE', 'X', '_MAXCACHE', '__all__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__version__', '_alphanum', '_cache', '_cache_repl', '_compile', '_compile_repl', '_expand', '_pattern_type', '_pickle', '_subx', 'compile', 'copy_reg', 'error', 'escape', 'findall', 'finditer', 'match', 'purge', 'search', 'split', 'sre_compile', 'sre_parse', 'sub', 'subn', 'sys', 'template']
#or use inspect, which is better
[('_compile', <function _compile at 0x7f5e2eced1b8>), ('_compile_repl', <function _compile_repl at 0x7f5e2eced230>), ('_expand', <function _expand at 0x7f5e2eced2a8>), ('_pickle', <function _pickle at 0x7f5e2eced398>), ('_subx', <function _subx at 0x7f5e2eced320>), ('compile', <function compile at 0x7f5e2ecf2f50>), ('escape', <function escape at 0x7f5e2eced140>), ('findall', <function findall at 0x7f5e2ecf2e60>), ('finditer', <function finditer at 0x7f5e2ecf2ed8>), ('match', <function match at 0x7f5e2ecf2c08>), ('purge', <function purge at 0x7f5e2eced050>), ('search', <function search at 0x7f5e2ecf2c80>), ('split', <function split at 0x7f5e2ecf2de8>), ('sub', <function sub at 0x7f5e2ecf2cf8>), ('subn', <function subn at 0x7f5e2ecf2d70>), ('template', <function template at 0x7f5e2eced0c8>)]
|