Cue/scales. Beautifiers and Pretty Printers. Beautifiers and pretty printers are essential language tools.
Unfortunately very few programmers use them. If you do not use please start now... that's a real life saver tool. Programmers spend 50% of their time just lookingat source code. Cli — command line tools — pyCLI v1.1.0 documentation. The cli package is a framework for making simple, correct command line applications in Python.
With cli, you can quickly add standard command line parsing; logging; unit and functional testing; and profiling to your CLI apps. To make it easier to do the right thing, cli wraps all of these tools into a single, consistent application interface. Installing cli You can install the latest stable version of cli using pip: Public repositories for the project are hosted at github, so you can use either git to get a copy of the project’s code and history: $ git clone. PyInstaller. PyInstaller is a program that converts (packages) Python programs into stand-alone executables, under Windows, Linux, Mac OS X, Solaris and AIX.
Its main advantages over similar tools are that PyInstaller works with any version of Python since 2.4, it builds smaller executables thanks to transparent compression, it is fully multi-platform, and use the OS support to load the dynamic libraries, thus ensuring full compatibility. The main goal of PyInstaller is to be compatible with 3rd-party packages out-of-the-box. This means that, with PyInstaller, all the required tricks to make external packages work are already integrated within PyInstaller itself so that there is no user intervention required. You'll never be required to look for tricks in wikis and apply custom modification to your files or your setup scripts. As an example, libraries like PyQt, Django or matplotlib are fully supported, without having to handle plugins or external data files manually.
Features ¶ Downloads ¶ License ¶ PyMonitor - Python Run Time Monitor Module.
C o r e P y : Synthetic Programming in Python. Burton Systems Software - TLIB Version Control - Overview. CVS - Open Source Version Control. Ctypes. Tracing Python memory leaks. While I was writing a python daemon, I noticed that my application process memory usage is growing over time.
The data wasn’t increasing so there must have been some memory leak. It’s not so easy for a Python application to leak memory. Usually there are three scenarios: some low level C library is leakingyour Python code have global lists or dicts that grow over time, and you forgot to remove the objects after usethere are some reference cycles in your app I remembered the post from Marius Gedminas, in which he traced his memory leaks, but I haven’t noticed before that he published his tools.
. $ pdb . After some time, when my application collected some garbages I pressed Ctrl+C: 2008-11-13 18:41:40,136 server.py INFO Quitting (Pdb) import gc (Pdb) gc.collect() 58 (Pdb) gc.collect() 0 Let’s see some statistics of object types in memory: Ore.svn. Python Call Graph. Virtualenv. Virtualenv is a tool to create isolated Python environments.
The basic problem being addressed is one of dependencies and versions, and indirectly permissions. Imagine you have an application that needs version 1 of LibFoo, but another application requires version 2. How can you use both these applications? If you install everything into /usr/lib/python2.4/site-packages (or whatever your platform's standard location is), it's easy to end up in a situation where you unintentionally upgrade an application that shouldn't be upgraded. Snakefood: Python Dependency Graphs. Generate dependency graphs from Python code.
This dependency tracker package has a few distinguishing characteristics: It uses the AST to parse the Python files. This is very reliable, it always runs.No module is loaded. Loading modules to figure out dependencies is almost always problem, because a lot of codebases run initialization code in the global namespace, which often requires additional setup. Snakefood is guaranteed not to have this problem (it just runs, no matter what).It works on a set of files, i.e. you do not have to specify a single script, you can select a directory (package or else) or a set of files. XRecord - An introspecting Python ORM.
Patcher - Labix. Introduction Patcher is a tool for quick creation of patches against a project source tree.
Patcher functionality resembles a lightweight version control system. It has no repository, and only controls differences between a pristine version and a working copy. Why The idea for developing patcher happened during the development of Conectiva Linux. Using patcher Here's a very simple succession of commands, with explanations. Unpack the project: Basic class code generator. When starting a new component or application, I find myself typing out the same thing over and over, using Snippets in my Toolbox, etc..
A lot of setup time is spent organising, fixing little mistakes, going back to add something forgotten and the like. The goal of this script was to reduce the amount of typing when starting from well defined requirements. I was also interested in creating uniform looking code, which can be helpful when dealing with hundreds of different db, model, or view controllers. Object Proxying. Generic proxy object with before/after method hooks. « Python re. I needed the ability to "trace" all function calls made to a particular object instance, in order to be able to "replay" them later in the same order and with the same values.
(This was useful for testing, I have tests that are generated with randomness and I wanted to be able to reproduce the random test run exactly when it found a bug.) So I wrote this little recipe, which allows you to create a proxy object to any existing instance, with hooks for particular method calls, or for all method calls. Derive from HookProxy and add the specific hooks you need to do logging the way you want it, and then use an instance of that in-place for your object. Python proxy pattern.