summaryrefslogtreecommitdiff
path: root/lab/show_platform.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-08-27 20:10:47 -0400
committerNed Batchelder <ned@nedbatchelder.com>2015-08-27 20:10:47 -0400
commit023ac5643de8f66bc6cc10e41676aee160f365da (patch)
tree9ffc41218a1c5a3e32eed9580e63d1bfb9e578ae /lab/show_platform.py
parentaeec2507cab7ce21ef21f5d56c4d6332aa210731 (diff)
downloadpython-coveragepy-git-023ac5643de8f66bc6cc10e41676aee160f365da.tar.gz
Helpful thing for seeing what platform.* gives me
Diffstat (limited to 'lab/show_platform.py')
-rw-r--r--lab/show_platform.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/lab/show_platform.py b/lab/show_platform.py
new file mode 100644
index 00000000..76122d58
--- /dev/null
+++ b/lab/show_platform.py
@@ -0,0 +1,16 @@
+import platform
+import types
+
+for n in dir(platform):
+ if n.startswith("_"):
+ continue
+ v = getattr(platform, n)
+ if isinstance(v, types.ModuleType):
+ continue
+ if callable(v):
+ try:
+ v = v()
+ n += "()"
+ except:
+ continue
+ print "%30s: %r" % (n, v)