Why the value returned by read_data,open... are unavailable in Jupyter notebook
I run the following commands in code cell of jupyternotebook.
indata = tmp_filename()
f = open(indata, "w")
f.write("17\n42\n")
f.close()
l = read_data(indata, ZZ); l
And I get the following error message:
TypeError: 'NoneType' object is not iterable
But the result is output in terminal.
[I 21:15:07.797 NotebookApp] Saving file at /Untitled.ipynb
[17, 42]
How to solve this problem?
By the way: some functions such as "print", "tmp_filename" also can not output in Jupter notebook. These functions work well in old sage math notebook.
There is an obvious indent error, but i suppose it comes from manually indenting 5 (and not 4) spaces the markdown message. Instead of using the pictogram with
and in my case the five lines work in jupyter notebook. I'we got (with deprecation warnings):
and the print was also working. I would try the same with a specific file name, then try to see if the file was written:
And indeed my home dir got the file with the content: