Search Results

Search found 1 results on 1 pages for 'dannycab'.

Page 1/1 | 1 

  • Writing a unique identifier to script?

    - by dannycab
    I'd like to write a subscript that adds a unique identifier (machine time) to a script everytime that it runs. However, each time I edit the script (in IDLE) the indetifiers are over-written. Is there a elegant way of doing this. The script that I wrote appears below. import os, time f = open('sys_time_append.py','r') lines = f.readlines() f.close() fout = open('sys_time_append.py','w') for thisline in lines: fout.write(thisline) fout.write('\n#'+str(time.time())+' s r\n') fout.close() Thanks for any help.

    Read the article

1