Skip to content

Commit

Permalink
fix kgpy access to help command
Browse files Browse the repository at this point in the history
  • Loading branch information
briangu committed Dec 14, 2023
1 parent 7341a10 commit 06ae777
Show file tree
Hide file tree
Showing 21 changed files with 52 additions and 1,073 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
README.md
graft lib
recursive-include klongpy/lib *.kg
13 changes: 8 additions & 5 deletions klongpy/sys_fn.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,19 @@ def eval_sys_load(klong, x):
"""
# if not (os.path.isfile(x) or os.path.isfile(os.path.join(x,".kg"))):
alt_dirs = str((os.environ.get('KLONGPATH') or ".:lib")).split(':')
alt_dirs = [x for x in str((os.environ.get('KLONGPATH') or ".:lib")).split(':') if x]
for ad in alt_dirs:
adx = os.path.join(ad,x)
if os.path.isfile(adx):
x = adx
break
adx = os.path.join(adx,".kg")
if os.path.isfile(adx):
x = adx
break
if not adx.endswith(".kg"):
adx = os.path.join(adx + ".kg")
if os.path.isfile(adx):
x = adx
break

print(x)

if not os.path.isfile(x):
raise FileNotFoundError(f"file does not exist: {x}")
Expand Down
8 changes: 0 additions & 8 deletions lib/README

This file was deleted.

40 changes: 0 additions & 40 deletions lib/csv.kg

This file was deleted.

24 changes: 0 additions & 24 deletions lib/edt.kg

This file was deleted.

57 changes: 0 additions & 57 deletions lib/eigenv.kg

This file was deleted.

88 changes: 0 additions & 88 deletions lib/help.kg

This file was deleted.

16 changes: 0 additions & 16 deletions lib/huffman.kg

This file was deleted.

Loading

0 comments on commit 06ae777

Please sign in to comment.