Ask Your Question
0

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

asked 5 years ago

Cyrille gravatar image

updated 5 years ago

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.

Preview: (hide)

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 ( 5 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 5 years ago

Emmanuel Charpentier gravatar image

updated 5 years ago

(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.

Preview: (hide)
link

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: 5 years ago

Seen: 364 times

Last updated: Dec 16 '19