1 | initial version |
Hello, @Cyrille! Suppose you have some code written in a file called "my_code.py
", and you want to use it in a Sage Notebook. All you have to do is use the command load("my_code.py")
.
Of course, this example assumes that you have created a notebook in the same folder as the file containing your code. If you have it some where else, you can specify its complete location as the argument of load
. For example, suppose you you have your file in your home directory in Linux, you can write in your notebook the following:
load("/home/cyrille/my_code.py")
From the point where you use this command, you will be able to use the functions and subroutines defined in my_code.py
.