Skip to main content

No project description provided

Project description

logging decorator

This project provides a logging decorator that allows you to put a wrapper on your functions to log their output. Inspired by cross cutting technologies I thought I'd do the same for python

from Baubles.Logger import Logger

logger = Logger()

def handler(*args, **kwargs):
	return 'in handler (%s, %s)' % (args, kwargs)

class Test(object):
	def __init__(self):

	def __del__(self):
	def run(self, a, k=None):
		return 'kk'

	def noFail(self, arg1, arg2, kwargs1=None):'did not fail')
		return True

	def willFail(self, arg1, arg2, kwargs1=None):
		raise Exception('failed and logged')
		return False

	def doFail(self, arg1, arg2, kwargs1=None):
		raise Exception('failed and handled')
		return False

test and examples

from Baubles.Logger import main



Pythonista Colour Console

for the Pythonista fans, make a file called with the following snippet and pop it in your site-packages directory.

import console

from Baubles.Colours import Colours
colours = Colours(colour=True)

import sys

Project details

Download files

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

Files for Baubles, version 1.6
Filename, size File type Python version Upload date Hashes
Filename, size Baubles-1.6.tar.gz (5.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page