This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Quick-and-dirty debugging output for tired programmers

Project Description

[![Build Status](https://travis-ci.org/zestyping/q.svg)](https://travis-ci.org/zestyping/q)

Quick and dirty debugging output for tired programmers.

Install q with “easy_install -U q” or “pip install -U q”.

All output goes to /tmp/q, which you can watch with this shell command:

tail -f /tmp/q

If TMPDIR is set, the output goes to $TMPDIR/q.

To print the value of foo, insert this into your program:

import q; q(foo)

To print the value of something in the middle of an expression, insert “q()”, “q/”, or “q|”. For example, given this statement:

file.write(prefix + (sep or '').join(items))

…you can print out various values without using any temporary variables:

file.write(prefix + q(sep or '').join(items))  # prints (sep or '')
file.write(q/prefix + (sep or '').join(items))  # prints prefix
file.write(q|prefix + (sep or '').join(items))  # prints the arg to write

To trace a function’s arguments and return value, insert this above the def:

import q
@q

To start an interactive console at any point in your code, call q.d():

import q; q.d()

The following [Lightning Talk](http://pyvideo.org/video/1858/sunday-evening-lightning-talks#t=25m15s) shows how powerful using q can be.

Release History

Release History

This version
History Node

2.6

History Node

2.5

History Node

2.4

History Node

2.3

History Node

2.2

History Node

2.1

History Node

2.0

History Node

1.1

History Node

1.0

History Node

0.01

History Node

0.00

History Node

0.0

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
q-2.6-py2.py3-none-any.whl (6.8 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Jun 22, 2015
q-2.6.tar.gz (7.7 kB) Copy SHA256 Checksum SHA256 Source Jun 22, 2015

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