Skip to content

Instantly share code, notes, and snippets.

@bckim92
Last active April 12, 2016 07:59
Show Gist options
  • Save bckim92/f7b2d9c808fb7de755db0d172ceb42a2 to your computer and use it in GitHub Desktop.
Save bckim92/f7b2d9c808fb7de755db0d172ceb42a2 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import subprocess
import sys
import os.path
argv = sys.argv[1:]
if not argv:
sys.stderr.write('Argument required\n')
sys.exit(1)
cmd = 'tensorboard --logdir={}'.format(
','.join(["%s:%s" % (s, os.path.realpath(s)) for s in argv[1:] if os.path.isdir(s) ])
)
print cmd
subprocess.call(cmd, shell=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment