Ask Your Question
0

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

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

Cyrille gravatar image

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

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 https://github.com/fordc5/PrisonersDi..., it will be great.

edit retag flag offensive close merge delete

Comments

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 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

Emmanuel Charpentier gravatar image

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

(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

Stats

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

Seen: 340 times

Last updated: Dec 16 '19