Skip to main content
Help improve PyPI by participating in a 5-minute user interface survey!

A tool for recursively exploring arbitrary python objects.

Project Description

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 history Release notifications

This version
History Node

0.2.13

History Node

0.2.12

History Node

0.2.11

History Node

0.2.10

History Node

0.2.9

History Node

0.2.8

History Node

0.2.7

History Node

0.2.6

History Node

0.2.5

History Node

0.2.4

History Node

0.2.3

History Node

0.2.2

History Node

0.2.1

History Node

0.1.3

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pynaut-0.2.13.zip (14.7 kB) Copy SHA256 hash SHA256 Source None Jan 21, 2015

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page