Hopefully this should explain what i'm trying to achieve

```
class A(object):
    def hello(self):
        print "hello"

a = A()
a.b = A()
a.b.c = A()
a.b.d = []
a.b.d.append(A())

p = Proxy(a)

print p.b
"b accessed"
<__main__.A object at 0xb73f3bec>

print p.b.c
"b accessed"
"c accessed"
<__main__.A object at 0xb73f3dec>

print p.b.d
"b accessed"
"d accessed"
[<__main__.A object at 0xb73f3bcc>]

print p.b.d[0]
"b accessed"
"d accessed"
<__main__.A object at 0xb73e766c>

print p.b.d[0].hello()
"b accessed"
"d accessed"
"hello called"
"hello"

```

Basically as far as I walk down a structure it keeps returning proxy objects. It would be best if it only created these proxy objects when the attribute is accessed for the first time and stored on the 'parent'. The goal of this is so that I can do some logic just before any method is called on an (nested) object

I had a look at:
<http://code.activestate.com/recipes/496741-object-proxying/>
But it only does the first layer, and I couldn't see how to manipulate it to work as I need.