#NEWLINE# def app_shared_key( ) : #NEWLINE# #INDENT# fn = sys . modules [ '__main__' ] . __file__ #NEWLINE# h = hash ( fn ) #NEWLINE# if ( h < 0 ) : #NEWLINE# #INDENT# h = ( 'a%lx' % ( - h ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# h = ( 'b%lx' % h ) #NEWLINE# #UNINDENT# name = os . path . splitext ( os . path . basename ( fn ) ) [ 0 ] #NEWLINE# if ( name == '__init__' ) : #NEWLINE# #INDENT# name = os . path . basename ( os . path . dirname ( os . path . abspath ( fn ) ) ) #NEWLINE# #UNINDENT# return ( '%s_%s' % ( name , h ) )