##// END OF EJS Templates
Prettified and hardened string/backslash quoting with ipsystem(), ipalias() and ...
Prettified and hardened string/backslash quoting with ipsystem(), ipalias() and ipmagic(). Now even \ characters are passed to %magics, !shell escapes and aliases exactly as they are in the ipython command line. Still have to fix cd to accept backslashes in windows, maybe by removing parse_options...

File last commit:

r97:90f94529
r100:d79e37bb
Show More
update_manual.py
26 lines | 476 B | text/x-python | PythonLexer
""" Must be launched via ipython not normal python
in ipython prompt do
> %run update_manual.py
"""
import sys,IPython,re
fil=open("magic.tex","w")
oldout=sys.stdout
sys.stdout=fil
ipmagic("magic -latex")
sys.stdout=oldout
fil.close()
fil=open("manual_base.lyx")
txt=fil.read()
fil.close()
manualtext=re.sub("__version__",IPython.__version__,txt)
fil=open("manual.lyx","w")
fil.write(manualtext)
fil.close()
print "Manual (magic.tex, manual.lyx) succesfully updated!"