Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

import print_function only works in one cell in linux

I just installed Sage in Linux Mint, and the Import print_function only seems to work in one cell in the Notebook.

If I type this in the top cell it works fine:

from __future__ import print_function

print("all","good","dogs","eat","shoes",sep=" now ")

to print this:

all now good now dogs now eat now shoes

But if I do exactly the same print in the next cell, I get a syntax error.

import print_function only works in one cell in linux

I just installed Sage in Linux Mint, and the Import print_function only seems to work in one cell in the Notebook.

If I type this in the top cell it works fine:

from __future__ import print_function

print("all","good","dogs","eat","shoes",sep=" now ")

to print this:

all now good now dogs now eat now shoes

But if I do exactly the same print in the next cell, without the import, I get a syntax error.error. However, the import does work for all cells in Sage for Windows.

import print_function only works in one cell in linux

I just installed Sage in Linux Mint, and the the Import print_function print_function only seems to work in one cell in the Notebook.

If I type this in the top cell it works fine:

from __future__ import print_function

print_function print("all","good","dogs","eat","shoes",sep=" now ")

")

to print this:

all now good now dogs now eat now shoes

shoes

But if I do exactly the same print in the next cell, without the import, I get a syntax error. However, the import does work for all cells in Sage for Windows.