diff --git a/pymolfile/plugin_list.py b/pymolfile/plugin_list.py index bab9696c4ebd49d3a67382a05128620b2154b44f..66ae7de6ec8972b8f02cd0df0ab9f51c6071a0d7 100644 --- a/pymolfile/plugin_list.py +++ b/pymolfile/plugin_list.py @@ -4,6 +4,8 @@ import sys try: from .molfile import libpymolfile except ImportError: + import traceback + traceback.print_exc() warnings.warn("libpymolfile package not available, pymolfile does not work without its library!") MAX_NUM_PLUGINS = 200 @@ -18,8 +20,8 @@ def byte_str_decode(data, dectype=None): def plugins(): """ Information on the available molfile plugins - Example tuple: ('psf', 'psf', 1, 1, 1, 0, 1, 1, 1, 0, - 'CHARMM,NAMD,XPLOR PSF', 'mol file reader', + Example tuple: ('psf', 'psf', 1, 1, 1, 0, 1, 1, 1, 0, + 'CHARMM,NAMD,XPLOR PSF', 'mol file reader', 'Justin Gullingsrud, John Stone', 1, 9, 17, 1) The fields in the tuple represent info in ordered as follows: @@ -39,18 +41,18 @@ def plugins(): 14: major version of the plugin 15: minor version of the plugin 16: ABI version of the plugin - 17: 1 if is reentrant (returns is_reentrant) + 17: 1 if is reentrant (returns is_reentrant) - Returns: A list of tuples that includes the information and - capabilities of each molfile plugin. The information is - extracted from molfile_plugin_t. + Returns: A list of tuples that includes the information and + capabilities of each molfile plugin. The information is + extracted from molfile_plugin_t. """ global C_MOLFILE_PLUGINS numlist = libpymolfile.molfile_init() if sys.version_info > (3,): basestring = str plugins_list = [ - [byte_str_decode(item, + [byte_str_decode(item, dectype="unicode_escape") for item in libpymolfile.molfile_plugin_info( C_MOLFILE_PLUGINS, i) ] for i in range(numlist)