diff options
| author | yo mama <pepper@scannerjammer.com> | 2015-09-11 18:54:37 -0700 |
|---|---|---|
| committer | yo mama <pepper@scannerjammer.com> | 2015-09-11 18:54:37 -0700 |
| commit | f904b1b552134e6b8701d9d94c7fed321011ae94 (patch) | |
| tree | fd898841f2a84bf3cccc7e1d2894d02c425cabc5 /Pb/inspect_objects_example.py | |
| parent | 7aaa91d7a090e4ab9be979160622f4c48e3d9b46 (diff) | |
finished the params class, almost done with pb master class
Diffstat (limited to 'Pb/inspect_objects_example.py')
| -rw-r--r-- | Pb/inspect_objects_example.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Pb/inspect_objects_example.py b/Pb/inspect_objects_example.py new file mode 100644 index 0000000..92e28b7 --- /dev/null +++ b/Pb/inspect_objects_example.py @@ -0,0 +1,15 @@ +class Test(object): + def __init__(self, one="la", two="di"): + self._test_args(inspect.getargvalues(inspect.currentframe())); + + def _test_args(self, _args_vals): + for arg in _args_vals.args: + if arg == "self": + continue + try: + sys.stdout.write("%s\n" % arg) + sys.stdout.write("\t%s\n" % _args_vals.locals.get(arg)) + except Exception as e: + sys.stderr.write("%s\n" % e ); + +t = Test(); |
