Revision 64a513337b22db0906d2f3ec7dafcb7c96ab34b5 authored by Eh Tan on 06 July 2007, 20:48:44 UTC, committed by Eh Tan on 06 July 2007, 20:48:44 UTC
1 parent bcff7e0
Raw File
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