ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 11 Jul 2018 14:35:20 -0500Differences between Python2 Sagemath and Python3 Sagemath?http://ask.sagemath.org/question/42932/differences-between-python2-sagemath-and-python3-sagemath/ With sagemath looking to move away from python2 in 2020 and as a new user of sagemath, I wanted to know what the differences are between Python2 Sagemath and Python3 Sagemath?
At the moment sagemath is not fully compatible with python3 and I have been told to expect problems. I want to know how serious these problems are and how frequent they are. I would then be able to know if using python3 sagemath is worth the trouble.number123Wed, 11 Jul 2018 14:35:20 -0500http://ask.sagemath.org/question/42932/Python 3 print in Sagehttp://ask.sagemath.org/question/38805/python-3-print-in-sage/ This is a minor issue, but I've long migrated all my Python scripts to Py3, so I'm trying to write in Sage in the most Py3-compliant way possible, since we'll have Py3 support in a not-so-distant future according to the FAQs (frankly I'm a bit surprised that Py3 support haven't already happened, but, oh well).
Anyway, because of that I put `from __future__ import print_function, division` in the very first line of my `init.sage`.
If I type things interactively in the prompt, it works as it's supposed to:
sage: print('C_r' ,6)
C_r 6
However, if I run a script with `load('my_script.sage')` it prints things as if I was using Py2.
('C_r', 6)
Am I loading my scripts wrong? How can I get it to work for scripts too?
Cheers.tomchoTue, 12 Sep 2017 11:40:04 -0500http://ask.sagemath.org/question/38805/Python compiler in Sage Notebookhttp://ask.sagemath.org/question/9298/python-compiler-in-sage-notebook/Do you know which version of Python has been providing in Sage Notebook?FastfootWed, 05 Sep 2012 11:02:26 -0500http://ask.sagemath.org/question/9298/