[IPython-dev] notebook %magic
Ralf Hemmecke
hemmecke at gmail.com
Thu May 31 17:02:40 EDT 2012
On 05/31/2012 10:49 PM, Thomas Kluyver wrote:
> On 31 May 2012 21:32, Ralf Hemmecke<hemmecke at gmail.com> wrote:
>> Anyway, if the ipython notebook should some day be able to be used as a
>> frontend for maple or mathematica then %, %% and %%% are bad, because of
>> their meaning inside the respective system.
>
> As far as I know, the notebook itself doesn't know about the escape
> sequences - that's all processed in the kernel. A hypothetical maple
> or mathematica kernel wouldn't process ipython escape sequences, so it
> shouldn't be an issue.
That maple/mathematica wouldn't process or even see magic sequences is
clear. I am more afraid of the fact that input/output lines of
mathematica/maple/fricas could confuse the program part that deals with
magic lines. Just suppose my notebook simply contains a cell that only
has the line
%pi
I don't yet know what ipython would be doing with that line, but it
looks like magic so I guess that cell would be empty if it is seen by
the fricas engine. Am I wrong? But I'd like fricas to see '%pi'.
Ralf
More information about the IPython-dev
mailing list