#!/usr/bin/env python
import sys
from theano import config
from theano.gof.cc import get_module_cache

if len(sys.argv) == 1:
    print config.compiledir
elif sys.argv[1] in ('clear'):
    get_module_cache().clear()
else:
    print 'command "%s" not recognized' % sys.argv[1]
    print 'Type "theano-cache" to print the cache location'
    print 'Type "theano-cache clear" to erase the cache'
    sys.exit(1)

