https://github.com/geodynamics/citcoms
Revision d2d1b093182ae4ba7e77438d3907d8af2fda910d authored by Rajesh Kommu on 25 June 2014, 22:04:27 UTC, committed by Rajesh Kommu on 25 June 2014, 22:04:27 UTC
1 parent 6ceb31d
Tip revision: d2d1b093182ae4ba7e77438d3907d8af2fda910d authored by Rajesh Kommu on 25 June 2014, 22:04:27 UTC
Removed Cookbook 9 from the CitcomS manual
Removed Cookbook 9 from the CitcomS manual
Tip revision: d2d1b09
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 ...