Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Benjamin Jakimow
EO Time Series Viewer
Commits
09537416
Commit
09537416
authored
Jun 29, 2012
by
Luke Campagnola
Browse files
Updated systemInfo() to read from .bzr if needed
parent
ad7b5f0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
__init__.py
View file @
09537416
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
REVISION
=
'621'
REVISION
=
None
### import all the goodies and add some helper functions for easy CLI use
### import all the goodies and add some helper functions for easy CLI use
...
@@ -11,7 +11,7 @@ from .Qt import QtGui
...
@@ -11,7 +11,7 @@ from .Qt import QtGui
#if QtGui.QApplication.instance() is None:
#if QtGui.QApplication.instance() is None:
#app = QtGui.QApplication([])
#app = QtGui.QApplication([])
import
sys
import
os
,
sys
## check python version
## check python version
if
sys
.
version_info
[
0
]
<
2
or
(
sys
.
version_info
[
0
]
==
2
and
sys
.
version_info
[
1
]
!=
7
):
if
sys
.
version_info
[
0
]
<
2
or
(
sys
.
version_info
[
0
]
==
2
and
sys
.
version_info
[
1
]
!=
7
):
...
@@ -53,6 +53,13 @@ def systemInfo():
...
@@ -53,6 +53,13 @@ def systemInfo():
print
"sys.version:"
,
sys
.
version
print
"sys.version:"
,
sys
.
version
from
.Qt
import
VERSION_INFO
from
.Qt
import
VERSION_INFO
print
"qt bindings:"
,
VERSION_INFO
print
"qt bindings:"
,
VERSION_INFO
global
REVISION
if
REVISION
is
None
:
## this code was probably checked out from bzr; look up the last-revision file
lastRevFile
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'.bzr'
,
'branch'
,
'last-revision'
)
if
os
.
path
.
exists
(
lastRevFile
):
REVISION
=
open
(
lastRevFile
,
'r'
).
read
().
strip
()
print
"pyqtgraph:"
,
REVISION
print
"pyqtgraph:"
,
REVISION
print
"config:"
print
"config:"
import
pprint
import
pprint
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment