+if (not ARGUMENTS.has_key('load_option') or \
+ ARGUMENTS['load_option'] in ['y', 'yes', 't', 'true', '1', 'all']) \
+ and os.path.isfile(env_cache_file):
+ cache_file = open(env_cache_file)
+ opt_cache = cPickle.load(cache_file)['arg_cache']
+ cache_file.close()
+ # import cached options, but we should ignore qt_dir when frontend changes
+ if ARGUMENTS.has_key('frontend') and opt_cache.has_key('frontend') \
+ and ARGUMENTS['frontend'] != opt_cache['frontend'] \
+ and opt_cache.has_key('qt_dir'):
+ opt_cache.pop('qt_dir')
+ # and we do not cache fast_start
+ if opt_cache.has_key('fast_start'):
+ opt_cache.pop('fast_start')
+ for key in opt_cache.keys():
+ if not ARGUMENTS.has_key(key):
+ ARGUMENTS[key] = opt_cache[key]
+ print "Restoring cached option %s=%s" % (key, ARGUMENTS[key])
+ print
+