On Tuesday, July 1, 2014 9:21:09 AM UTC-7, Sébastien Labbé wrote: > Now (since at least one year, but I don't know which version exactly), tmp > files are created with some hashed value in the end and the left and right > arrow do not correspond to the order of creation of the files anymore. Two > friends of mine keep asking me this question and I now ask this on > sage-devel. Was this change intended? Is it OK if we change it back to an > lexicographic order for files? > It probably was intended. As a general rule, temporary files live in directories where multiple entities have file creation privileges, including ones that don't necessarily trust each other fully. If you're creating filenames via a predictable pattern, you're vulnerable to a denial of service, since an adversary might try and predict which file you're going to try and create next and do that before you.
I'm not so sure sage has that exact problem, but as a general rule, things that can happen out of malice can also happen accidentally, so properly randomizing temporary file names would probably be advisable. What you're describing is a situation where the files weren't intended to be temporary after all--apparently they're output. The proper solution is of course to save your plots instead: def tempname(n=0): while True: yield "file_%d.png"%n n+=1 T=tempname() plot(x,0,10).save(next(T)) plot(x,0,11).save(next(T)) plot(x,0,12).save(next(T)) I have to admit, though, that the previous behaviour has been useful for me in the past as well. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.