forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrootbrowse.py
More file actions
executable file
·42 lines (29 loc) · 812 Bytes
/
rootbrowse.py
File metadata and controls
executable file
·42 lines (29 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env @python@
# ROOT command line tools: rootbrowse
# Author: Julien Ripoche
# Mail: julien.ripoche@u-psud.fr
# Date: 20/08/15
"""Command line to open a ROOT file on a TBrowser"""
import cmdLineUtils
import sys
# Help strings
description = "Open a ROOT file in a TBrowser"
EPILOG = """Examples:
- rootbrowse
Open a TBrowser
- rootbrowse file.root
Open the ROOT file 'file.root' in a TBrowser
"""
def get_argparse():
# Collect arguments with the module argparse
parser = cmdLineUtils.getParserSingleFile(description, EPILOG)
parser.prog = 'rootbrowse'
return parser
def execute():
parser = get_argparse()
# Put arguments in shape
args = cmdLineUtils.getArgs(parser)
# Process rootBrowse
return cmdLineUtils.rootBrowse(args.FILE)
if __name__ == "__main__":
sys.exit(execute())