-
Notifications
You must be signed in to change notification settings - Fork 8
/
installSpI.py
49 lines (36 loc) · 1.53 KB
/
installSpI.py
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
import os
from pathlib import Path
# This little program copies the current Notebooks to the local directory
print('--------------------------------------------------------')
nbdir = Path(__file__).resolve().parent/'Notebooks'
lfiles = [i.name for i in nbdir.glob('*.ipynb')]+['README.md']
print("""
Spike comes with a set of interactive tools, and notebooks, collectively called SpikeInteractive or SpI
This program will copy the corresponding files from {0} to the current location:
{1}
You probably don't need all of them, pick the one(s) needed here, and remove the other ones safely.
( Warning: files with the same name in the current location will be overriden )
""".format( nbdir, '\n'.join(lfiles)) )
s = 'Y'
s = input("Ok to proceed (Y/n)")
if s not in ('',None,'Y','y'):
print('Aborted')
exit(0)
print()
for f in lfiles:
print('copying', f, end='...')
with open(nbdir/f,'r') as ff:
with open(f,'w') as FF:
FF.write(ff.read())
print('Done')
print("""
These programs are jupyter notebooks programs.
To use these NoteBook, the jupyter tool, with the ipympl add-on should be installed
To lanch them, either type
> jupyter notebook
in a terminal, or use the anaconda launcher
This will start a browser with this list, just click on a file to used it.
Each file realizes a specific actions - look at the README.md for the details.
The files can be modified, duplicated and copied anywhere.
A good habit is to have one such notebook for each dataset or list of datasets on which you are working
""")