Skip to content

Commit 20debed

Browse files
committed
Compatible with python 3.5. qt4base must also be modified to be compatible with python 3.5.
1 parent 40f96ce commit 20debed

3 files changed

Lines changed: 19 additions & 19 deletions

File tree

122 KB
Binary file not shown.

Resources/dvPlotterResources_rc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from PyQt4 import QtCore
1010

11-
qt_resource_data = "\
11+
qt_resource_data = b"\
1212
\x00\x00\x04\xc3\
1313
\x89\
1414
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
@@ -7767,7 +7767,7 @@
77677767
\x82\xd5\xac\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
77687768
"
77697769

7770-
qt_resource_name = "\
7770+
qt_resource_name = b"\
77717771
\x00\x09\
77727772
\x07\x36\x6d\xa2\
77737773
\x00\x64\
@@ -7839,7 +7839,7 @@
78397839
\x00\x72\x00\x6f\x00\x77\x00\x73\x00\x65\x00\x2e\x00\x70\x00\x6e\x00\x67\
78407840
"
78417841

7842-
qt_resource_struct = "\
7842+
qt_resource_struct = b"\
78437843
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
78447844
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
78457845
\x00\x00\x00\x18\x00\x02\x00\x00\x00\x0f\x00\x00\x00\x03\

dataVaultLivePlotter.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import numpy as np
1313
import pyqtgraph as pg
1414
import pyqtgraph.exporters
15-
import exceptions
15+
#import exceptions
1616
import time
1717
import copy
1818
import datetime as dt
@@ -262,7 +262,7 @@ def openLivePlots(self, twoPlots, onePlots, fresh, c = None):
262262
print("Following error was thrown: ")
263263
print(str(inst))
264264
print("Error thrown on line: ")
265-
print(sys.exc_traceback.tb_lineno)
265+
print(sys.exc_info()[2])
266266
plt1, plt2 = len(self.existing1DPlotDict), len(self.existing2DPlotDict)
267267

268268
try:
@@ -300,7 +300,7 @@ def openLivePlots(self, twoPlots, onePlots, fresh, c = None):
300300
print("Following error was thrown: ")
301301
print(str(inst))
302302
print("Error thrown on line: ")
303-
print("sys.exc_traceback.tb_lineno")
303+
print(sys.exc_info()[2])
304304
elif fresh == 1:
305305
try:
306306
x0, y0 = 450, 25
@@ -327,7 +327,7 @@ def openLivePlots(self, twoPlots, onePlots, fresh, c = None):
327327
print("Following error was thrown: ")
328328
print(str(inst))
329329
print("Error thrown on line: ")
330-
print(sys.exc_traceback.tb_lineno)
330+
print(sys.exc_info()[2])
331331

332332
self.allowPlot = True
333333

@@ -345,7 +345,7 @@ def openSavedPlots(self, file, dir, allPlots, dim):
345345
print("Following error was thrown: ")
346346
print(str(inst))
347347
print("Error thrown on line: ")
348-
print(sys.exc_traceback.tb_lineno)
348+
print(sys.exc_info()[2])
349349
elif dim == 1:
350350
for plot in allPlots:
351351
try:
@@ -358,7 +358,7 @@ def openSavedPlots(self, file, dir, allPlots, dim):
358358
print("Following error was thrown: ")
359359
print(str(inst))
360360
print("Error thrown on line: ")
361-
print(sys.exc_traceback.tb_lineno)
361+
print(sys.exc_info()[2])
362362

363363
def plotLiveData(self):
364364
self.dvExplorer = dataVaultExplorer(self.reactor, 'live', self.listenTo, self)
@@ -616,7 +616,7 @@ def setupListener(self, c):
616616
print("Following error was thrown: ")
617617
print(str(inst))
618618
print("Error thrown on line: ")
619-
print(sys.exc_traceback.tb_lineno)
619+
print(sys.exc_info()[2])
620620
@inlineCallbacks
621621
def addListen(self, c):
622622
yield self.dv.signal__data_available(self.id)
@@ -710,7 +710,7 @@ def autoHistFunc(self, state):
710710
print("Following error was thrown: ")
711711
print(str(inst))
712712
print("Error thrown on line: ")
713-
print(sys.exc_traceback.tb_lineno)
713+
print(sys.exc_info()[2])
714714

715715
def toggleTraceFunc(self):
716716
jj = self.i % 2
@@ -969,7 +969,7 @@ def updatePlot(self, c, signal):
969969
print("Following error was thrown: ")
970970
print(str(inst))
971971
print("Error thrown on line: ")
972-
print(sys.exc_traceback.tb_lineno)
972+
print(sys.exc_info()[2])
973973
@inlineCallbacks
974974
def plotMore(self, newData, x_ind, y_ind, z_ind, c):
975975
yield self.sleep(0.1)
@@ -1187,7 +1187,7 @@ def setupListener(self, c):
11871187
print("Following error was thrown: ")
11881188
print(str(inst))
11891189
print("Error thrown on line: ")
1190-
print(sys.exc_traceback.tb_lineno)
1190+
print(sys.exc_info()[2])
11911191

11921192
@inlineCallbacks
11931193
def addListen(self, c):
@@ -1258,7 +1258,7 @@ def plotMore(self, x_ind, y_ind, c):
12581258
print("Following error was thrown: ")
12591259
print(str(inst))
12601260
print("Error thrown on line: ")
1261-
print(sys.exc_traceback.tb_lineno)
1261+
print(sys.exc_info()[2])
12621262
def sleep(self,secs):
12631263
d = Deferred()
12641264
self.reactor.callLater(secs,d.callback,'Sleeping')
@@ -1888,7 +1888,7 @@ def loadData(self, c):
18881888
print("Following error was thrown: ")
18891889
print(str(inst))
18901890
print("Error thrown on line: ")
1891-
print(sys.exc_traceback.tb_lineno)
1891+
print(sys.exc_info()[2])
18921892

18931893
self.mainPlot.setImage(self.plotData, autoRange = True , autoLevels = True, pos=[self.x0, self.y0],scale=[self.xscale, self.yscale])
18941894

@@ -2095,7 +2095,7 @@ def genPDF(self, folder, fileName, header, plot):
20952095
print("Following error was thrown: ")
20962096
print(str(inst))
20972097
print("Error thrown on line: ")
2098-
print(sys.exc_traceback.tb_lineno)
2098+
print(sys.exc_info()[2])
20992099

21002100
if plot < 3:
21012101
self.print_pdf(html, str(fileName))
@@ -2113,7 +2113,7 @@ def genPDF(self, folder, fileName, header, plot):
21132113
print("Following error was thrown: ")
21142114
print(str(inst))
21152115
print("Error thrown on line: ")
2116-
print(sys.exc_traceback.tb_lineno)
2116+
print(sys.exc_info()[2])
21172117
tmp_loc = ''
21182118
yield self.sleep(0.5)
21192119
try:
@@ -2125,7 +2125,7 @@ def genPDF(self, folder, fileName, header, plot):
21252125
print("Following error was thrown: ")
21262126
print(str(inst))
21272127
print("Error thrown on line: ")
2128-
print(sys.exc_traceback.tb_lineno)
2128+
print(sys.exc_info()[2])
21292129
os.chdir(init_loc)
21302130

21312131

@@ -2640,7 +2640,7 @@ def initPlot(self, c = None):
26402640
print("Following error was thrown: ")
26412641
print(str(inst))
26422642
print("Error thrown on line: ")
2643-
print(sys.exc_traceback.tb_lineno)
2643+
print(sys.exc_info()[2])
26442644
elif self.fresh == 2:
26452645
print("2D Info: ", self.plot2DInfo)
26462646
print("1D Info: ", self.plot1DInfo)

0 commit comments

Comments
 (0)