Skip to content

Instantly share code, notes, and snippets.

View shaunbrady's full-sized avatar

Shaun Brady shaunbrady

View GitHub Profile
@shaunbrady
shaunbrady / poc.py
Created May 14, 2015 22:10
POC for Plugin model
#!/usr/bin/python
import pprint
import inspect
from copy import deepcopy
class NimbisActionPluginMeta(type):
# we use __init__ rather than __new__ here because we want
# to modify attributes of the class *after* they have been
# created
#!/usr/bin/python
class TestMeta(type):
# we use __init__ rather than __new__ here because we want
# to modify attributes of the class *after* they have been
# created
def __init__(cls, name, bases, dct):
if not hasattr(cls, 'registry'):
# this is the base class. Create an empty registry
print "cls is {0}".format(cls)