This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This module prints function trace to stdout from the moment it is called:

import xtrace
xtrace.start()
...
xtrace.stop()

It is also possible to call xtrace as module from the command line:

python -m xtrace <script.py> [param] ...

or use as a standalone script:

python xtrace.py <script.py> [param] ...

The output format is inspired by Xdebug function traces and will likely to merge with it http://xdebug.org/docs/execution_trace to be compatible with PHP inspection tools. But I didn’t have enough time to polish it, so feel free to send a patch if you know how to bring them closer.

This code is released into public domain. Enjoy!

History

  • 0.5 - fix major crash when function in executed script tried to read variables in its global scope
  • 0.4 - added beep function which beeps in DEBUG mode when excited
  • 0.3 - fix AttributeError when running from console (issue #2)
  • 0.2 - added version info, support running from command line, moved main functions into a class to isolate used variables in local namespace
  • 0.1 - initial release

Credits

Amaury Forgeot d’Arc, for valuable insight into Python internals

Debugging

To see various internal events that xtrace produces on top of standard data provided by Python, enable DEBUG option:

import xtrace
xtrace.DEBUG = True

This will call beep functiton for every interesting event. Feel free to override it (monkeypatch) with your own to filter messages, forward, etc.

Known Python Bugs

Python bugs affecting trace output in unexpected way:

http://bugs.python.org/issue15005 (Python 2, Linux only)
  • captured stdout from subprocess call becomes corrupted under a trace function that prints to the screen
Release History

Release History

0.5

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
xtrace-0.5.zip (5.1 kB) Copy SHA256 Checksum SHA256 Source Feb 17, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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