Skip to content

Commit 92adc72

Browse files
committed
fix(ticket): #10, added command line commands
1 parent 95a7608 commit 92adc72

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

app.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@
1717
import sys
1818

1919
import logging
20+
import argparse
2021
from logging.config import dictConfig
2122

2223
from PyQt5.QtWidgets import QApplication
2324
from pugdebug.pugdebug import Pugdebug
25+
VERSION = '1.0.0'
2426

2527
if __name__ == "__main__":
2628
config = dict(
@@ -41,6 +43,14 @@
4143
'level': logging.DEBUG
4244
}
4345
)
46+
47+
parser = argparse.ArgumentParser()
48+
parser.add_argument('--version', help='Version of pugdebug', action="store_true")
49+
args = parser.parse_args()
50+
if args.version:
51+
print('Pubdebug version: ' + VERSION)
52+
sys.exit()
53+
4454
dictConfig(config)
4555
logger = logging.getLogger()
4656
app = QApplication(sys.argv)

0 commit comments

Comments
 (0)