/usr/bin/sqlobject-admin is in python-sqlobject 0.12.4-2.
This file is owned by root:root, with mode 0o755.
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 24 25 26 27 28 29 30 31 32 33 34 35 | #!/usr/bin/python
import sys
import os
try:
import pkg_resources
pkg_resources.require('SQLObject>0.6.1')
except (ImportError, pkg_resources.DistributionNotFound):
# Oh well, we tried...
pass
try:
import sqlobject.manager
except ImportError:
try:
here = __file__
except NameError:
here = sys.argv[0]
updir = os.path.join(
os.path.dirname(os.path.dirname(os.path.abspath(here))),
'sqlobject')
if os.path.exists(updir):
sys.path.insert(0, os.path.dirname(updir))
else:
print 'I cannot find the sqlobject module'
print 'If SQLObject is installed, you may need to set $PYTHONPATH'
sys.exit(3)
# Now we have to get rid of possibly stale modules from that import
# up there
for name, value in sys.modules.items():
if name.startswith('sqlobject'):
del sys.modules[name]
from sqlobject.manager import command
command.the_runner.run(sys.argv)
|