Hey,
I have performed some minor changes, so models can be loaded from any path - not just from the install path of pymad, like this:
# search models also in 'models' subdirectory of current directory:
cpymad.listModels.modelpathes.append(os.path.join('.', 'models'))
It seems to be working fine. On the other hand, I don't know for what pkgutil.get_data and pkg_resources.resource_string were used in cern.cpymad.model._get_file_content() - so there might be a bit of an redundancy or inconsistency now.
That sounds like a good idea, thank you for the suggestion! I will take some time to review it to see how it fits into the structure, but generally I like it.
Hey, I have performed some minor changes, so models can be loaded from any path - not just from the install path of pymad, like this:
It seems to be working fine. On the other hand, I don't know for what
pkgutil.get_data
andpkg_resources.resource_string
were used incern.cpymad.model._get_file_content()
- so there might be a bit of an redundancy or inconsistency now.Tell me what you think about this.
Best regards, Thomas