Ask Your Question

silvia_n_nets's profile - activity

2017-12-21 11:43:12 +0200 received badge  Good Question (source)
2017-12-09 19:00:41 +0200 received badge  Famous Question (source)
2016-10-17 19:10:44 +0200 received badge  Notable Question (source)
2016-09-01 23:01:25 +0200 received badge  Popular Question (source)
2016-06-29 00:29:12 +0200 received badge  Nice Question (source)
2016-06-28 23:55:06 +0200 received badge  Student (source)
2016-06-28 21:52:15 +0200 asked a question Can I create a sage file, and import it as a Python module?

I am trying to create a file that produces some data using sage specific modules (eg graphs. ). Is there a way that I can save this file and then import it in a Python shell and / or in a Sage shell?

The problems I have encountered so far are:

  • if I try to save the file as filename.py and import it as a module in a Python or Sage shell, Python/ Sage won't recognize the sage specific functions (which makes sense)
  • if I try to save the file as filename.sage and import it as a module in a Sage shell, I get the error "No module named filename"

I am working from an Ubuntu terminal.

Thank you!