https://github.com/geodynamics/citcoms
Revision ac6cb950a2a9a0724f5aaf876fa9688ef4d82281 authored by Eh Tan on 16 March 2009, 22:44:42 UTC, committed by Eh Tan on 16 March 2009, 22:44:42 UTC
1 parent 8c586f0
Tip revision: ac6cb950a2a9a0724f5aaf876fa9688ef4d82281 authored by Eh Tan on 16 March 2009, 22:44:42 UTC
change the default of mgunit
change the default of mgunit
Tip revision: ac6cb95
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 ...