Changeset 59
- Timestamp:
- 02/23/12 04:03:39
- Files:
-
- points/trunk/points.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
points/trunk/points.py
r48 r59 67 67 import math 68 68 import shutil 69 import time 69 70 from datetime import datetime 70 71 … … 216 217 command_line = "%s %s" % (sys.executable, 217 218 " ".join(sys.argv)) 218 handle = open(backup_path, "w") 219 if copy: 220 dest = goto_path 221 dupe = backup_path 222 else: 223 dest = backup_path 224 dupe = None 225 226 handle = open(dest, "w") 219 227 handle.write(first_template % (goto_name, 220 228 now_string, … … 225 233 handle.close() 226 234 227 if copy: 228 shutil.copy2(backup_path, goto_path) 235 if dupe: 236 shutil.copy2(dest, dupe) 237 print "\nCopied from %s to %s." % (dest, dupe), 238 sys.stdout.flush() 239 240 time.sleep(1) 229 241 return points 230 242