提交 28cc1821 authored 作者: David Warde-Farley's avatar David Warde-Farley

Fix bin/ dir

上级 3912f7ef
...@@ -13,25 +13,25 @@ _logger = logging.getLogger('theano.bin.theano-cache') ...@@ -13,25 +13,25 @@ _logger = logging.getLogger('theano.bin.theano-cache')
def print_help(exit_status): def print_help(exit_status):
if exit_status: if exit_status:
print 'command "%s" not recognized' % (' '.join(sys.argv)) print('command "%s" not recognized' % (' '.join(sys.argv)))
print 'Type "theano-cache" to print the cache location' print('Type "theano-cache" to print the cache location')
print 'Type "theano-cache help" to print this help' print('Type "theano-cache help" to print this help')
print 'Type "theano-cache clear" to erase the cache' print('Type "theano-cache clear" to erase the cache')
print 'Type "theano-cache list" to print the cache content' print('Type "theano-cache list" to print the cache content')
print 'Type "theano-cache unlock" to unlock the cache directory' print('Type "theano-cache unlock" to unlock the cache directory')
print 'Type "theano-cache cleanup" to delete keys in the old format/code version' print('Type "theano-cache cleanup" to delete keys in the old format/code version')
print 'Type "theano-cache purge" to force deletion of the cache directory' print('Type "theano-cache purge" to force deletion of the cache directory')
print ('Type "theano-cache basecompiledir" ' print('Type "theano-cache basecompiledir" ')
'to print the parent of the cache directory') 'to print the parent of the cache directory')
print ('Type "theano-cache basecompiledir list" ' print('Type "theano-cache basecompiledir list" '
'to print the content of the base compile dir') 'to print the content of the base compile dir')
print ('Type "theano-cache basecompiledir purge" ' print('Type "theano-cache basecompiledir purge" '
'to remove everything in the base compile dir, ' 'to remove everything in the base compile dir, '
'that is, erase ALL cache directories') 'that is, erase ALL cache directories')
sys.exit(exit_status) sys.exit(exit_status)
if len(sys.argv) == 1: if len(sys.argv) == 1:
print config.compiledir print(config.compiledir)
elif len(sys.argv) == 2: elif len(sys.argv) == 2:
if sys.argv[1] == 'help': if sys.argv[1] == 'help':
print_help(exit_status=0) print_help(exit_status=0)
...@@ -64,12 +64,12 @@ elif len(sys.argv) == 2: ...@@ -64,12 +64,12 @@ elif len(sys.argv) == 2:
cache.clear_old() cache.clear_old()
elif sys.argv[1] == 'unlock': elif sys.argv[1] == 'unlock':
theano.gof.compilelock.force_unlock() theano.gof.compilelock.force_unlock()
print 'Lock successfully removed!' print('Lock successfully removed!')
elif sys.argv[1] == 'purge': elif sys.argv[1] == 'purge':
theano.gof.compiledir.compiledir_purge() theano.gof.compiledir.compiledir_purge()
elif sys.argv[1] == 'basecompiledir': elif sys.argv[1] == 'basecompiledir':
# Simply print the base_compiledir # Simply print the base_compiledir
print theano.config.base_compiledir print(theano.config.base_compiledir)
else: else:
print_help(exit_status=1) print_help(exit_status=1)
elif len(sys.argv) == 3 and sys.argv[1] == 'basecompiledir': elif len(sys.argv) == 3 and sys.argv[1] == 'basecompiledir':
......
...@@ -195,7 +195,7 @@ def help(): ...@@ -195,7 +195,7 @@ def help():
The other options will be passed to nosetests, see ``nosetests -h``. The other options will be passed to nosetests, see ``nosetests -h``.
""" """
print textwrap.dedent(help_msg) print(textwrap.dedent(help_msg))
class DisabDocString(Plugin): class DisabDocString(Plugin):
......
...@@ -19,7 +19,7 @@ http://somethingaboutorange.com/mrl/projects/nose ...@@ -19,7 +19,7 @@ http://somethingaboutorange.com/mrl/projects/nose
Exiting.""" Exiting."""
import sys import sys
print >> sys.stderr, error print(error, file=sys.stderr)
else: else:
import theano import theano
theano.test() theano.test()
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论