def get_run_number():
    try:
        f = open(os.path.join(os.getenv('DATA_HOME', "."), 'RUNNUM'), 'r')
        num = int(f.read())
        f.close()
    except:
        num = 1
    f = open(os.path.join(os.getenv('DATA_HOME', "."), 'RUNNUM'), 'w')
    f.write(str(num + 1))
    f.close()
    return num
Allow custom configuration
dataset/ETHPy150Open UDST/urbansim/urbansim/utils/misc.py/get_run_number--crossover with--dataset/ETHPy150Open rapidsms/rapidsms-core-dev/lib/rapidsms/tests/backend/test_http.py/test_config