Skip to content

Commit 45fdec1

Browse files
committed
ipython
1 parent 91b4bc4 commit 45fdec1

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

ide/python/init.ipy

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,22 @@
1717

1818
# invoked by ipython from the root folder
1919
from pathlib import Path
20+
from subprocess import run
2021

22+
args = {}
23+
lines = []
24+
25+
try:
26+
lines += Path(".env").read_text().splitlines()
27+
except: pass
28+
try:
29+
lines += Path("packages/.env").read_text().splitlines()
30+
except: pass
2131
try:
22-
lines = Path(".env").read_text().splitlines()
23-
args = { line.split("=",1)[0]: line.split("=",1)[-1] for line in lines}
24-
except:
25-
args = {}
32+
lines += run(["nuv", "-config", "-dump"], capture_output=True, text=True).stdout.splitlines()
33+
except: pass
34+
35+
args = { line.split("=",1)[0]: line.split("=",1)[-1] for line in lines}
2636

2737
%load_ext autoreload
2838
%autoreload 2

ide/python/nuvfile.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,3 @@ tasks:
6363
fi
6464
ipython -i init.ipy
6565
66-
67-
boh:
68-
desc: boh
69-
cmds:
70-
- |
71-
trap 'echo wakeup' EXIT
72-
echo sleeping
73-
sleep 100

0 commit comments

Comments
 (0)