On 12/31/2012 08:57 AM, Timo wrote:
Hi,

Before 5.4, tmp_filename() would return "incremental" file names:
|
sage:tmp_filename()
'/home/jaje/.sage//temp/ukko/26221//tmp_0'
sage:tmp_filename()
'/home/jaje/.sage//temp/ukko/26221//tmp_1'
sage:tmp_filename()
'/home/jaje/.sage//temp/ukko/26221//tmp_2'
|

But now it returns "random" names:
|
sage:tmp_filename()
'/home/jaje/.sage/temp/ukko/26039/tmp_gduqsJ'
sage:tmp_filename()
'/home/jaje/.sage/temp/ukko/26039/tmp_jLC8_s'
sage:tmp_filename()
'/home/jaje/.sage/temp/ukko/26039/tmp_BnfOIA'
|

This has been changed in Ticket
http://trac.sagemath.org/sage_trac/ticket/13579.

I use the "incremental" filename feature a lot when I experiment with
pictures: I like to see what I have plotted, in *chronological order*,
using my image viewer. With the new random file names this is impossible.

Any chance to get the old naming scheme back? (I'm sure I'm not the only
one who was using this "feature".)

It looks like #13579 changed this feature for security reasons. As such, it would be a bad idea to reintroduce this back.

Why don't you provide your own prefix to the tmp_filename() function? You could provide it a prefix with a counter, and you will have lexicographically increasing filenames as well as the added security:

for i in range(5):
   tmp_filename(name="tmp_%d_"%(i))


--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.


Reply via email to