/usr/lib/python3/dist-packages/pyutilib/component/loader/tests/egg1.py is in python3-pyutilib 5.3.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | import pyutilib.component.core
import sys
import os
import logging
currdir=sys.argv[-2]+os.sep
pyutilib.component.core.PluginGlobals.add_env(pyutilib.component.core.PluginEnvironment("testing"))
service = pyutilib.component.core.PluginFactory("EggLoader", namespace='project1', env='pca')
pyutilib.misc.setup_redirect(currdir+"egg1.out")
if service is None:
print("Cannot test the PyUtilib EggLoader Plugin on this system because the pkg_resources package is not available.")
sys.exit(1)
#
#logging.basicConfig(level=logging.DEBUG)
#
pyutilib.component.core.PluginGlobals.get_env().load_services(path=currdir+"eggs1")
#
if sys.argv[-1] == 'json':
pyutilib.component.core.PluginGlobals.pprint(json=True)
else:
pyutilib.component.core.PluginGlobals.pprint()
pyutilib.misc.reset_redirect()
|