These lines exist in
__init__.py of cbv. What are they doing?
# try to add the cvb module path to the PYTHONPATH try: site_packages = next(p for p in _sys.path if 'site-packages' in p) importpath = _os.path.join(site_packages,"cvb") _sys.path.append(importpath) except: print('failed to add cvb module path to sys.path. Is site-packages missing?')
When using the PDM package manager, the
site-packages structure is not there. This means the we get an ugly print statement onto the command line. The same is probably true when building into an exe, or other such things.
Perhaps consider using the
logging module so we can control it without patching
CVBpy and wrapping your exceptions so to avoid us digging through all the modules trying to find a print statement or exception, since we have no way of knowing that it is coming from this module.
What are your thoughts?