https://github.com/geodynamics/citcoms
Revision 3a7ef1bc943866ac51f59d63baa7553d42b88d81 authored by Rajesh Kommu on 27 August 2014, 22:00:27 UTC, committed by Rajesh Kommu on 27 August 2014, 22:00:27 UTC
1 parent 75fda8c
Tip revision: 3a7ef1bc943866ac51f59d63baa7553d42b88d81 authored by Rajesh Kommu on 27 August 2014, 22:00:27 UTC
minor corrections to get Py2C to build automatically
minor corrections to get Py2C to build automatically
Tip revision: 3a7ef1b
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 ...