Back to home page

EIC code displayed by LXR

 
 

    


Warning, /edpm/bin/edpm is written in an unsupported language. File is not indexed.

0001 #!/usr/bin/env python3
0002 import sys
0003 import os
0004 import inspect
0005 
0006 if __name__ == '__main__':
0007 
0008     # make sure this command will work with edpm in this dir
0009     edpm_file_path = os.path.dirname(inspect.stack()[0][1])
0010 
0011     # Fixes the case if somebody set a link like ln -s /.../bin/edpm /usr/bin/
0012     if os.path.islink(edpm_file_path):
0013         edpm_file_path = os.path.realpath(edpm_file_path)
0014 
0015     edpm_top_dir = os.path.dirname(edpm_file_path)
0016 
0017     sys.path.insert(0, edpm_top_dir)
0018 
0019     try:
0020         import edpm
0021 
0022         # Run edpm cli
0023         edpm.edpm_cli()
0024     except ModuleNotFoundError as ex:
0025         if 'appdirs' in str(ex):
0026             print("No module named 'appdirs'. Please install it. 'python3 -m pip install --user appdirs' should work")