equal
deleted
inserted
replaced
5 # This software may be used and distributed according to the terms |
5 # This software may be used and distributed according to the terms |
6 # of the GNU General Public License, incorporated herein by reference. |
6 # of the GNU General Public License, incorporated herein by reference. |
7 |
7 |
8 import os |
8 import os |
9 |
9 |
|
10 def rename(src, dst): |
|
11 try: |
|
12 os.rename(src, dst) |
|
13 except: |
|
14 os.unlink(dst) |
|
15 os.rename(src, dst) |
|
16 |
|
17 # Platfor specific varients |
10 if os.name == 'nt': |
18 if os.name == 'nt': |
11 def pconvert(path): |
19 def pconvert(path): |
12 return path.replace("\\", "/") |
20 return path.replace("\\", "/") |
13 else: |
21 else: |
14 def pconvert(path): |
22 def pconvert(path): |