diff options
| author | Christoph Berg <christoph.berg@credativ.de> | 2019-03-11 14:19:23 +0100 |
|---|---|---|
| committer | Christoph Berg <christoph.berg@credativ.de> | 2019-03-11 14:19:23 +0100 |
| commit | 200de07a95209a55d6019ba87f0abc78d302bf4c (patch) | |
| tree | 3b2922eb5d89b01ad214cae492e871c3bfb5df18 /contrib/QDarkStyleSheet/script/run_ui_css_edition.py | |
| parent | e0737c56c1e384e05064a0c6e1ac46979371041b (diff) | |
New upstream version 2.0.1+repackupstream/2.0.1+repack
Diffstat (limited to 'contrib/QDarkStyleSheet/script/run_ui_css_edition.py')
| -rwxr-xr-x | contrib/QDarkStyleSheet/script/run_ui_css_edition.py | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/contrib/QDarkStyleSheet/script/run_ui_css_edition.py b/contrib/QDarkStyleSheet/script/run_ui_css_edition.py new file mode 100755 index 00000000..754f46c8 --- /dev/null +++ b/contrib/QDarkStyleSheet/script/run_ui_css_edition.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +"""Process qrc and ui files, then run example in while loop.""" + +from __future__ import absolute_import, print_function + +import sys +from subprocess import call + + +def main(): + """Process qrc and ui files, then run example in while loop.""" + dark = None + no_dark = None + + while True: + try: + dark.kill() + except AttributeError: + print('Dark not running!') + except Exception: + print('Dark still running!') + else: + print('Dark was killed!') + + try: + no_dark.kill() + except AttributeError: + print('No Dark not running!') + except Exception: + print('No Dark still running!') + else: + print('No Dark was killed!') + + print(sys.argv) + + # process qrc files + call(['python', 'process_qrc.py']) + # process ui files + call(['python', 'process_ui.py']) + # open dark example + dark = call(['python', '../example/example.py'] + sys.argv[1:]) + # open no dark example + no_dark = call(['python', '../example/example.py', '--no_dark'] + sys.argv[1:]) + + if dark or no_dark: + print('Unf! It not worked! Please, check the error(s).') + break + + +if __name__ == "__main__": + sys.exit(main()) |
