I have sage 9.5 on Ubuntu 22.04/22.10.
I have the following code inside my files
delta=simplicial_complexes.RandomComplex(4,1)
print(delta.facets())
If the file is named as test.sage, the program works fine.
If the file is named as test.txt, the program outputs
delta=simplicial_complexes.RandomComplex(4,1)
NameError: name 'simplicial_complexes' is not defined
Why does this happen?