Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1cbce7d commit 48e5bb1Copy full SHA for 48e5bb1
lib/matplotlib/backends/backend_qt4.py
@@ -1,6 +1,7 @@
1
from __future__ import division, print_function
2
import math
3
import os
4
+import re
5
import signal
6
import sys
7
@@ -57,7 +58,7 @@ def _create_qApp():
57
58
# check for DISPLAY env variable on X11 build of Qt
59
if hasattr(QtGui, "QX11Info"):
60
display = os.environ.get('DISPLAY')
- if (display is None) or (not ':' in display):
61
+ if display is None or not re.search(':\d', display):
62
raise RuntimeError('Invalid DISPLAY variable')
63
64
qApp = QtGui.QApplication( [" "] )
0 commit comments