class Test:

    def __init__(self):
        self.a = 'a test class'

def say_hi(self):
    print('Hi from this Test object!')
print('ID: {}'.format(repr(self)))
print('Data: {}'.format(str(self.__dict__)))
Control indentation with Org–Babel