source: branches/mpimystic/mystic_files.py @ 224

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
2import os
3
4PATH_1 = ".."+os.sep+"mystic"+os.sep+"examples"
5TARGET_1 = ["test_twistedgaussian.py","test_br8.py", \
6            "test_mogi.py","test_mogi2.py"]
7
8target_dir = os.curdir+os.sep+PATH_1+os.sep
9destination_dir = os.curdir+os.sep+"examples_other"+os.sep
10
11def 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
21def 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
30if __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.