diff options
Diffstat (limited to 'xboomx/bin/xboomx_path.py')
-rwxr-xr-x | xboomx/bin/xboomx_path.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/xboomx/bin/xboomx_path.py b/xboomx/bin/xboomx_path.py index 56779b3..4a5e87c 100755 --- a/xboomx/bin/xboomx_path.py +++ b/xboomx/bin/xboomx_path.py @@ -1,23 +1,27 @@ -#!/usr/bin/python +#!/usr/bin/env python3 +# coding=utf-8 import os from xboomx.config import config +__author__ = 'Victor Häggqvist' + def main(): - pathes = os.environ['PATH'].split(':') + paths = os.environ['PATH'].split(':') items = [] - for path in pathes: + for path in paths: if os.path.isdir(path): for f in os.listdir(path): items.append(f) - uniqeitems = list(set(items)) + unique_items = list(set(items)) - ignorelist = config.get("ignorelist",""); - for item in uniqeitems: - if item not in ignorelist: - print item + ignore_list = config.get("ignorelist", "") + for item in unique_items: + if item not in ignore_list: + print(item) -main()
\ No newline at end of file +if __name__ == '__main__': + main() |