Problem with string.py and math.py

24 views
Skip to first unread message

Jeroen Sijsling

unread,
May 22, 2016, 9:55:23 AM5/22/16
to sage-devel
Dear all,

(I also posted this about a quarter of an hour ago, but I now think that I must have done something wrong. I am sorry if this turns out to be a double post.)

For some reason I placed a file called string.py in the directory where I normally run Sage. I then ran Sage in the usual way, without specifying this file, and saw the result of evaluating it pass by before the Sage prompt appeared. I then tested that it also works after replacing the contents of string.py with

import shutil
shutil.rmtree("dir")

in the sense that once run there is no more directory dir. This does not just happen on my own machine; I have logged in at some other places in the world where I have an account, and there the same thing occurs, whether the version is 7.1 or 7.2. It seems risky.

The side effects also occurs after renaming to math.py, but renaming to string.sage removes them.

Best regards,
Jeroen Sijsling

Volker Braun

unread,
May 22, 2016, 10:08:59 AM5/22/16
to sage-devel
"." is in sys.path unless others have write permissions on the current directory.
Reply all
Reply to author
Forward
0 new messages