ó
êxTc           @   sL   d  d l  m Z d  d l m Z d   Z e d k rH d   Z e   n  d S(   i˙˙˙˙(   t   division(   t   easy_runc         C   sB   y$ t  j d |   j   j d } Wn t k
 r= |  } n X| S(   s    Return the demangled C++ function name corresponding to symbol
      on platforms featuring c++filt. On those which do not, return symbol
      untouched
  s
   c++filt %si    (   R   t   fully_bufferedt   raise_if_errorst   stdout_linest   AssertionError(   t   symbolt   result(    (    sF   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/libtbx/cpp_function_name.pyt   demangle   s    
t   __main__c           C   s   t  d  d k s t  d  S(   NtJ   __ZN5iotbx2xd17master_file_input8on_errorEPKcRKNS_10flex_bison8locationEPvs^   iotbx::xd::master_file_input::on_error(char const*, iotbx::flex_bison::location const&, void*)(   R   R   (    (    (    sF   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/libtbx/cpp_function_name.pyt   exercise_demangle   s    	N(   t
   __future__R    t   libtbxR   R   t   __name__R   (    (    (    sF   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/libtbx/cpp_function_name.pyt   <module>   s
   		