https://github.com/geodynamics/citcoms
Revision 5a0eadfd7ff11a7494442933abf87f58cbb2efee authored by Rajesh Kommu on 25 June 2014, 23:11:59 UTC, committed by Rajesh Kommu on 25 June 2014, 23:11:59 UTC
parameters with default values from cookbook4 in the examples/Cookbook4
directory
1 parent e13ba7e
Raw File
Tip revision: 5a0eadfd7ff11a7494442933abf87f58cbb2efee authored by Rajesh Kommu on 25 June 2014, 23:11:59 UTC
Updated Cookbook 4 in the CitcomS manual to the pure C version. Removed
Tip revision: 5a0eadf
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