Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.87 KB | None | 0 0
  1. if "forcebalance" in __name__:
  2.     #============================#                                                                                                                                                                                                            
  3.     #| DCD read/write functions |#                                                                                                                                                                                                            
  4.     #============================#                                                                                                                                                                                                            
  5.     # Try to load _dcdlib.so either from a directory in the LD_LIBRARY_PATH                                                                                                                                                                  
  6.     # or from the same directory as this module.                                                                                                                                                                                              
  7.     have_dcdlib = False
  8.     for fnm in ["_dcdlib.so",
  9.                 os.path.join(imp.find_module(__name__.split('.')[0])[1],"_dcdlib.so"),
  10.                 os.path.join(imp.find_module(__name__.split('.')[0])[1],"_dcdlib"+str(sysconfig.get_config_var('EXT_SUFFIX'))),
  11.                 os.path.join(os.path.dirname(__file__),"_dcdlib.so"),
  12.                 os.path.join(os.path.dirname(__file__),"_dcdlib"+str(sysconfig.get_config_var('EXT_SUFFIX')))]:
  13.         if os.path.exists(fnm):
  14.             _dcdlib = CDLL(fnm)
  15.             have_dcdlib = True
  16.             break
  17.     if not have_dcdlib:
  18.         warn('The dcdlib module cannot be imported (Cannot read/write DCD files)')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement