Skip to main content

pynaunt allows you to deeply explore and introspect arbitrary python objects.

As an example, we can explore the os module just a bit:

>>> from pynaut import Container
>>> import os
>>> obj = Container(os)
>>> len(list(obj.children))
203
>>> w = list(obj.grep_attr_names('wait'))
>>> len(w)
23
>>> [a.name for a in w]
['wait',
  'wait4',
  'wait3',
  'wait',
  'wait4',
  'wait3',
  'waitpid',
  'wait',
  'wait4',
  'wait3',
  'waitpid',
  'wait',
  'wait4',
  'wait3',
  'wait',
  'wait4',
  'wait3',
  'waitpid',
  'waitpid',
  'waitpid',
  'waitget',
  'waitget',
  'waitget']
>>> from types import ModuleType
>>> test = lambda c: isinstance(c.obj, (bool, list, ModuleType))
>>> foo = list(obj.get_attr_matches(test))
>>> len(foo)
620
>>> [a.name for a in foo][:10]
['UserDict',
  'errno',
  'path',
  'auto_magic',
  'genericpath',
  'stat',
  'os',
  'UserDict',
  'errno',
  'path']

Additionally, there is support for searching an entire object tree for a (name, attribute) pair that meets an arbitrary condition.

pynaut also includes a very basic curses based interface (pynaut_curses) that lets you explore objects by descending through the attribute tree.

Release files for pynaut 0.2.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pynaut 0.2.13
File Size Uploaded
pynaut-0.2.13.zip 14.7 kB Details

Release files / pynaut-0.2.13.zip

Download URL pynaut-0.2.13.zip
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c91e3fe1e3c3488c8c55aaec06901d851d42c90c34d835a28e741113a773ea13
BLAKE2b-256 checksum
How to use checksums
d4eedf987cca304d8dd5e1f3bf65035151dad4740da3294a42ff3627cf7ee8e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.13 This release

1 release file

0.2.12

1 release file

0.2.11

1 release file

0.2.10

1 release file

0.2.9

1 release file

0.2.8

1 release file

0.2.7

1 release file

0.2.6

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.1.3

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page