Ask Your Question

Running Python code from Jupyter and transforming it in a Sage function

asked 2019-12-11 10:01:06 +0200

Cyrille gravatar image

updated 2019-12-16 15:11:43 +0200

Iguananaut gravatar image

I would like to know if it is possible to run a python code directly within a notebook and transform it in a sagemath function. The problem is that I am nearly sure that is possible, but I do not know how to install it --- I am under windows an a poor programmer.

For instance if some one has to kindness to take as an exemple, it will be great.

edit retag flag offensive close merge delete


Aside from Emmanuel's answer, which is correct, it's not really clear to me what you tried to do or what problem you had. When you write "The problem is that I am nearly sure that is possible, but I do not know how to install it" I'm not sure what you mean by "install it". Install what?

Iguananaut gravatar imageIguananaut ( 2019-12-16 15:13:16 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-12-11 22:07:34 +0200

Emmanuel Charpentier gravatar image

updated 2019-12-11 22:14:03 +0200

(Preparsed) Sage code is essentially Python code... The difference are minor, and mostly introduced by the preparser or the use of Sage-specific functions. So pasting Python code in a Sage notebook should (mostly) work...

This page may give you some useful pointers... This document is a useful introduction.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-12-11 10:01:06 +0200

Seen: 308 times

Last updated: Dec 16 '19