[IPython-User] configuring prompts for custom substitutions
Skipper Seabold
jsseabold@gmail....
Thu Aug 23 13:13:43 CDT 2012
Hi,
I'm having some trouble working through the code. Is there anyway to inject
user-defined (callable) substitutions into the prompts. E.g., something like
def am_at_home():
import os
if os.path.expanduser('~') == os.path.abspath(os.path.curdir):
return "(home)"
return ""
c.PromptManager.in_template = '[\#]: \foo'
c.PromptManager.templates.update({'foo' : am_at_home})
Thanks,
Skipper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20120823/4b939196/attachment.html
More information about the IPython-User
mailing list