MCPcopy Create free account
hub / github.com/numpy/numpy / show_all

Function show_all

numpy/distutils/system_info.py:3237–3268  ·  view source on GitHub ↗
(argv=None)

Source from the content-addressed store, hash-verified

3235
3236
3237def show_all(argv=None):
3238 import inspect
3239 if argv is None:
3240 argv = sys.argv
3241 opts, args = parseCmdLine(argv)
3242 if opts.verbose:
3243 log.set_threshold(log.DEBUG)
3244 else:
3245 log.set_threshold(log.INFO)
3246 show_only = []
3247 for n in args:
3248 if n[-5:] != '_info':
3249 n = n + '_info'
3250 show_only.append(n)
3251 show_all = not show_only
3252 _gdict_ = globals().copy()
3253 for name, c in _gdict_.items():
3254 if not inspect.isclass(c):
3255 continue
3256 if not issubclass(c, system_info) or c is system_info:
3257 continue
3258 if not show_all:
3259 if name not in show_only:
3260 continue
3261 del show_only[show_only.index(name)]
3262 conf = c()
3263 conf.verbosity = 2
3264 # we don't need the result, but we want
3265 # the side effect of printing diagnostics
3266 conf.get_info()
3267 if show_only:
3268 log.info('Info classes not defined: %s', ','.join(show_only))
3269
3270if __name__ == "__main__":
3271 show_all()

Callers 2

mainFunction · 0.90
system_info.pyFile · 0.85

Calls 6

parseCmdLineFunction · 0.85
infoMethod · 0.80
copyMethod · 0.45
indexMethod · 0.45
get_infoMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected