def get_print_name(node, simple_form=True):
 name = node.fullname
 if hasattr(node, u'_interface'):
  pkglist = node._interface.__class__.__module__.split(u'.')
  interface = node._interface.__class__.__name__
  destclass = u''
  if (len(pkglist) > 2):
   destclass = (u'.%s' % pkglist[2])
  if simple_form:
   name = (node.fullname + destclass)
  else:
   name = (u'.'.join([node.fullname, interface]) + destclass)
 if simple_form:
  parts = name.split(u'.')
  if (len(parts) > 2):
   return (u' ('.join(parts[1:]) + u')')
  elif (len(parts) == 2):
   return parts[1]
 return name

def get_print_name ( node , simple_form = True ) : name = node . fullname if hasattr ( node , u'_interface' ) : pkglist = node . _interface . __class__ . __module__ . split ( u'.' ) interface = node . _interface . __class__ . __name__ destclass = u'' if ( len ( pkglist ) > 2 ) : destclass = ( u'.%s' % pkglist [ 2 ] ) if simple_form : name = ( node . fullname + destclass ) else : name = ( u'.' . join ( [ node . fullname , interface ] ) + destclass ) if simple_form : parts = name . split ( u'.' ) if ( len ( parts ) > 2 ) : return ( u' (' . join ( parts [ 1 : ] ) + u')' ) elif ( len ( parts ) == 2 ) : return parts [ 1 ] return name
get the name of the node for example .