Show More
@@ -585,6 +585,15 b' def system(cmd, environ={}, cwd=None, on' | |||||
585 | if cwd is not None and oldcwd != cwd: |
|
585 | if cwd is not None and oldcwd != cwd: | |
586 | os.chdir(oldcwd) |
|
586 | os.chdir(oldcwd) | |
587 |
|
587 | |||
|
588 | # os.path.lexists is not available on python2.3 | |||
|
589 | def lexists(filename): | |||
|
590 | "test whether a file with this name exists. does not follow symlinks" | |||
|
591 | try: | |||
|
592 | os.lstat(filename) | |||
|
593 | except: | |||
|
594 | return False | |||
|
595 | return True | |||
|
596 | ||||
588 | def rename(src, dst): |
|
597 | def rename(src, dst): | |
589 | """forcibly rename a file""" |
|
598 | """forcibly rename a file""" | |
590 | try: |
|
599 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now