Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Debug Tools for Python.

Project Description

author: Ilya Shalyapin,


pip install dt


First of all you need to import debug tools.

import dt

Quick text saving to temp file

>>> text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'

Run “less” from python

>>> text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
>>> dt.less(text)

Run ack-grep from python

>>> text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
>>> dt.grep('-i lorem', text)
Lorem ipsum dolor sit amet, consectetur adipiscing elit...

Easy XML-formatting

>>> xml = u'<data><item>hellow world</item></data>'
>>> dt.xmlprint(xml)
  <a>hellow world</a>

Display stings in nested objects in human readable format

There is to functions for that pprint and uprint. First function output is easy to read, but in some cases it might not work. The second works in any cases.

>>> data = [u'лимон', u'апельсин', {u'фрукты':(u'мандарины',)}]
>>> print data
[u'\u043b\u0438\u043c\u043e\u043d', u'\u0430\u043f\u0435\u043b\u044c\u0441\u0438\u043d', {u'\u0444\u0440\u0443\u043a\u0442\u044b': (u'\u043c\u0430\u043d\u0434\u0430\u0440\u0438\u043d\u044b',)}]
>>> dt.uprint(data)
["лимон", "апельсин", {"фрукты":("мандарины",),},]
>>> dt.pprint(data)
 {u'фрукты': (u'мандарины',)}]
Release History

Release History

This version
History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
dt-0.2.tar.gz (2.7 kB) Copy SHA256 Checksum SHA256 Source Nov 12, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting