/usr/share/pyshared/adios/skel_settings.py is in libadios-dev 1.5.0-1ubuntu7.
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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | #!/usr/bin/env python
from __future__ import absolute_import, division, print_function
import sys
import os.path
import shutil
class skel_settings:
def __init__(self):
self.settings_dict = {}
# Parse the settings file. Ignore comments. Process name=value pairs.
settings_file_name = '~/.skel/settings'
settings_file = open (os.path.expanduser (settings_file_name) )
for line in settings_file:
line = line.strip()
if line.startswith ('#'):
continue
if line == '':
continue
split_line = line.split('=')
if not len (split_line) == 2:
print('Malformed configuration line: ' + line)
print('Ignoring')
continue
self.settings_dict[split_line[0]] = split_line[1]
# def get_skel_home (self):
# return self.settings_dict['skel_home']
def get_deploy_dir (self):
return self.settings_dict['deploy_dir']
def get_submit_target (self):
t = self.settings_dict['submit_target']
if t == None or t == '':
return "sith"
else:
return t
def get_account (self):
return self.settings_dict['account']
def get_settings_dict (self):
return self.settings_dict
def create_settings_dir_if_needed():
skel_settings_dir_name = os.path.expanduser ('~/.skel')
if not os.path.exists (skel_settings_dir_name):
bindir = os.path.dirname (sys.argv[0])
shutil.copytree ('/etc/adios/skel', skel_settings_dir_name)
print('Created ' + skel_settings_dir_name)
def main(argv=None):
create_settings_dir_if_needed()
if __name__ == "__main__":
main()
|