| Revision 224,
889 bytes
checked in by mmckerns, 6 years ago
(diff) |
|
cleanup after core of pyina moves to pathos; remainder moves to mpimystic
|
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | #!/usr/bin/env python |
|---|
| 2 | import os |
|---|
| 3 | |
|---|
| 4 | PATH_1 = ".."+os.sep+"mystic"+os.sep+"examples" |
|---|
| 5 | TARGET_1 = ["test_twistedgaussian.py","test_br8.py", \ |
|---|
| 6 | "test_mogi.py","test_mogi2.py"] |
|---|
| 7 | |
|---|
| 8 | target_dir = os.curdir+os.sep+PATH_1+os.sep |
|---|
| 9 | destination_dir = os.curdir+os.sep+"examples_other"+os.sep |
|---|
| 10 | |
|---|
| 11 | def copy(): |
|---|
| 12 | for file in TARGET_1: |
|---|
| 13 | fin = "%s%s" % (target_dir,file) |
|---|
| 14 | fout = "%s%s" % (destination_dir,file) |
|---|
| 15 | try: |
|---|
| 16 | os.link(fin,fout) |
|---|
| 17 | except OSError: |
|---|
| 18 | pass |
|---|
| 19 | return |
|---|
| 20 | |
|---|
| 21 | def clean(): |
|---|
| 22 | for file in TARGET_1: |
|---|
| 23 | fout = "%s%s" % (destination_dir,file) |
|---|
| 24 | try: |
|---|
| 25 | os.remove(fout) |
|---|
| 26 | except OSError: |
|---|
| 27 | pass |
|---|
| 28 | return |
|---|
| 29 | |
|---|
| 30 | if __name__=="__main__": |
|---|
| 31 | import sys |
|---|
| 32 | if sys.argv[-1] == "-clean": |
|---|
| 33 | print "removing mystic files..." |
|---|
| 34 | clean() |
|---|
| 35 | else: |
|---|
| 36 | print "copying mystic files..." |
|---|
| 37 | copy() |
|---|
| 38 | |
|---|
| 39 | # End of file |
|---|
Note: See
TracBrowser
for help on using the repository browser.