Skip to content

Commit 79b69da

Browse files
Merge pull request #50 from chrisjbillington/remove-cruft
Remove cruft
2 parents 52a6deb + 3a5389e commit 79b69da

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+12
-396
lines changed

labscript_devices/AlazarTechBoard.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,13 @@
22
# Hacked up from NIboard.py by LDT 2017-01-26
33
#
44
# Copyright (c) Monash University 2017
5-
from __future__ import division, unicode_literals, print_function
65
import ctypes
76
import numpy as np
87
import signal
98
import sys
109
import time
1110
from tqdm import tqdm
1211

13-
from labscript_utils import PY2
14-
if PY2:
15-
str = unicode
16-
1712
# Install atsapi.py into site-packages for this to work
1813
# or keep in local directory.
1914
import labscript_devices.atsapi as ats
@@ -275,11 +270,7 @@ def init(self):
275270
global h5py
276271
import labscript_utils.h5_lock
277272
import h5py
278-
from labscript_utils import PY2
279-
if PY2:
280-
from Queue import Queue
281-
else:
282-
from queue import Queue
273+
from queue import Queue
283274
import threading
284275

285276
# SDK startup

labscript_devices/AndorSolis/andor_sdk/andor_solis.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
from .status_codes import _SC
1313
from .andor_structures import ColorDemosaicInfo, AndorCapabilities
1414

15-
PYTHON = sys.version_info
16-
1715
# Custom ctypes
1816
at_32 = ctypes.c_long
1917
at_64 = ctypes.c_uint64

labscript_devices/Camera.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,6 @@
1010
# the project for the full license. #
1111
# #
1212
#####################################################################
13-
from __future__ import division, unicode_literals, print_function, absolute_import
14-
15-
from labscript_utils import check_version
16-
check_version('labscript', '2.0.1', '3')
17-
check_version('zprocess', '2.4.8', '3')
18-
from labscript_utils import PY2
19-
if PY2:
20-
str = unicode
21-
2213
from labscript_devices import BLACS_tab
2314
from labscript import TriggerableDevice, LabscriptError, set_passed_properties
2415
import numpy as np

labscript_devices/CiceroOpalKellyXEM3001.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@
1111
# #
1212
#####################################################################
1313

14-
from __future__ import division, unicode_literals, print_function, absolute_import
15-
from labscript_utils import PY2
16-
if PY2:
17-
str = unicode
18-
1914
from labscript import Device, PseudoclockDevice, Pseudoclock, ClockLine, config, LabscriptError, set_passed_properties, compiler, IntermediateDevice, WaitMonitor, DigitalOut
2015
from labscript_devices import runviewer_parser, BLACS_tab, BLACS_worker, labscript_device
2116

@@ -461,8 +456,6 @@ def init(self):
461456

462457
# Initialise connection to OPAL KELLY Board
463458
self.dev = ok.okCFrontPanel()
464-
if PY2:
465-
self.serial = bytes(self.serial)
466459
assert self.dev.OpenBySerial(self.serial) == self.dev.NoError
467460

468461
try:
@@ -488,8 +481,6 @@ def flash_FPGA(self):
488481
raise RuntimeError('Cannot flash the FPGA for the current reference clock configuration as the .bit file is missing. Please ensure the correct bit file is available at %s'%fpga_path)
489482

490483
self.logger.debug('Flashing FPGA bit file located at: %s'%fpga_path)
491-
if PY2:
492-
fpga_path = bytes(fpga_path)
493484
self.dev.ConfigureFPGA(fpga_path)
494485
assert self.dev.IsFrontPanelEnabled(), 'Flashing of the FPGA failed. The device is not configured with the .bit file correctly'
495486

labscript_devices/DummyIntermediateDevice.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
# #
1212
#####################################################################
1313

14-
from __future__ import division, unicode_literals, print_function, absolute_import
15-
from labscript_utils import PY2
16-
if PY2:
17-
str = unicode
1814

1915
# This file represents a dummy labscript device for purposes of testing BLACS
2016
# and labscript. The device is a Intermediate Device, and can be attached to

labscript_devices/DummyPseudoclock/__init__.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@
1010
# the project for the full license. #
1111
# #
1212
#####################################################################
13-
from __future__ import division, unicode_literals, print_function, absolute_import
14-
from labscript_utils import PY2
15-
if PY2:
16-
str = unicode
17-
1813
from labscript_devices import deprecated_import_alias
1914

2015

labscript_devices/DummyPseudoclock/blacs_tabs.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
# the project for the full license. #
1111
# #
1212
#####################################################################
13-
from __future__ import division, unicode_literals, print_function, absolute_import
14-
from labscript_utils import PY2
15-
if PY2:
16-
str = unicode
1713
from blacs.device_base_class import DeviceTab, define_state, MODE_BUFFERED
1814

1915
class DummyPseudoclockTab(DeviceTab):

labscript_devices/DummyPseudoclock/blacs_workers.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
# the project for the full license. #
1111
# #
1212
#####################################################################
13-
from __future__ import division, unicode_literals, print_function, absolute_import
14-
from labscript_utils import PY2
15-
if PY2:
16-
str = unicode
1713
import time
1814
import labscript_utils.h5_lock
1915
import h5py

labscript_devices/DummyPseudoclock/labscript_devices.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
# the project for the full license. #
1111
# #
1212
#####################################################################
13-
from __future__ import division, unicode_literals, print_function, absolute_import
14-
from labscript_utils import PY2
15-
if PY2:
16-
str = unicode
1713

1814
# This file represents a dummy labscript device for purposes of testing BLACS
1915
# and labscript. The device is a PseudoclockDevice, and can be the sole device
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +0,0 @@
1-
2-
import sys
3-
if sys.version_info < (3,6):
4-
raise RuntimeError("FlyCapture2Camera strongly prefers Python 3.6+")

0 commit comments

Comments
 (0)