GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
grut-view.py
Go to the documentation of this file.
1import gc
2import os
3import sys
4import warnings
5import threading
6import Tkinter as tk
7import time
8
9import ROOT
10ROOT.PyConfig.IgnoreCommandLineOptions = True
11warnings.filterwarnings(action='ignore',category=RuntimeWarning,
12 message='creating converter.*')
13ROOT.PyConfig.StartGuiThread = False
14ROOT.PyConfig.IgnoreCommandLineOptions = True
15
16sys.argv = sys.argv[1:] # ROOT appends 'python' to the beginning of sys.argv
17sys.argv.insert(0,'grut-view.py')
18
19sys.path.append(os.environ['GRSISYS'])
20from pygui.mainwindow import MainWindow
21
22ident = threading.current_thread().ident
23
24def update():
25 try:
26 if (threading.current_thread().ident == ident and
27 window is not None):
28 window.Update()
29 except tk.TclError:
30 pass
31 except Exception as e:
32 print e
33
35 global window
36 window = None
37 gc.collect()
38
39window = None
40window = MainWindow()