Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Using multiple lines of pari/gp code in a Sage notebook

I am struggling to get multiple lines of pari/gp code working in a Jupyter Sage notebook.

When I enter:

%%gp
for(x=1,10,print(x))

it all works fine, however when I for instance write:

%%gp
for(x=1,10,{
    print(x);
})

the system just 'hangs' and doesn't return any output. The same issue occurs in the Cocalc Sage cloud environment. I also tried 'pari/gp in your browser' and there it works fine.

Am I doing something wrong or isn't the multi-line pari/gp option supported in Sage?