https://github.com/geodynamics/citcoms
Revision ed21917c422e2b2845aa230cedc877de143a8a6e authored by Thorsten Becker on 25 March 2013, 21:56:47 UTC, committed by Thorsten Becker on 25 March 2013, 21:56:47 UTC
1 parent c5526ec
Tip revision: ed21917c422e2b2845aa230cedc877de143a8a6e authored by Thorsten Becker on 25 March 2013, 21:56:47 UTC
Updating to newest version for testing purposes.
Updating to newest version for testing purposes.
Tip revision: ed21917
citcoms_datadir
#!/usr/bin/env python
def get_var():
# get your username on this machine, and make it upper case
import os
var = os.environ.get("USER")
return var.upper()
# invariant prefix of datadir
prefix = "/scratch/"
# invariant suffix of datadir
suffix = ""
# get the machine-dependent part of datadir
var_path = get_var()
# construct the full string for datadir
print "%s%s%s" % ( prefix, var_path, suffix )
Computing file changes ...