Either uses H as global
def __init__( self ):
global H
if H == None:
...
or pass it as argument of the init method:
def __init__( self, H ):
...
you can also make H a variable from your class:
class MyObject():
H = None
def __init__( self ):
if MyObject.H == None:
...
CLICK HERE to find out more related problems solutions.