https://github.com/geodynamics/citcoms
Raw File
Tip revision: afe1ae73551e31c1cbe9df6d68c9cbee26b07464 authored by Eh Tan on 16 January 2012, 21:21:30 UTC
Merged r16160, r16161, r16216, and r16349 from trunk to v3.1 branch
Tip revision: afe1ae7
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 )
back to top