Show More
@@ -0,0 +1,26 b'' | |||
|
1 | """ Must be launched via ipython not normal python | |
|
2 | ||
|
3 | in ipython prompt do | |
|
4 | ||
|
5 | > %run update_manual.py | |
|
6 | """ | |
|
7 | ||
|
8 | import sys,IPython,re | |
|
9 | ||
|
10 | ||
|
11 | fil=open("magic.tex","w") | |
|
12 | oldout=sys.stdout | |
|
13 | sys.stdout=fil | |
|
14 | ipmagic("magic -latex") | |
|
15 | sys.stdout=oldout | |
|
16 | fil.close() | |
|
17 | ||
|
18 | fil=open("manual_base.lyx") | |
|
19 | txt=fil.read() | |
|
20 | fil.close() | |
|
21 | ||
|
22 | manualtext=re.sub("__version__",IPython.__version__,txt) | |
|
23 | fil=open("manual.lyx","w") | |
|
24 | fil.write(manualtext) | |
|
25 | fil.close() | |
|
26 | print "Manual (magic.tex, manual.lyx) succesfully updated!" |
General Comments 0
You need to be logged in to leave comments.
Login now