Skip to content
Snippets Groups Projects
Unverified Commit aff27446 authored by Michael DM Dryden's avatar Michael DM Dryden
Browse files

Converted all classes to new-style. (inherit from object)

parent 62c21642
Branches
Tags
No related merge requests found
...@@ -29,7 +29,7 @@ class delayedSerial(serial.Serial): ...@@ -29,7 +29,7 @@ class delayedSerial(serial.Serial):
serial.Serial.write(self, i) serial.Serial.write(self, i)
time.sleep(.001) time.sleep(.001)
class SerialDevices: class SerialDevices(object):
"""Retrieves and stores list of serial devices in self.ports""" """Retrieves and stores list of serial devices in self.ports"""
def __init__(self): def __init__(self):
try: try:
...@@ -42,7 +42,7 @@ class SerialDevices: ...@@ -42,7 +42,7 @@ class SerialDevices:
"""Refreshes list of ports.""" """Refreshes list of ports."""
self.ports, _, _ = zip(*list_ports.comports()) self.ports, _, _ = zip(*list_ports.comports())
class Experiment: class Experiment(object):
"""Store and acquire a potentiostat experiment. Meant to be subclassed """Store and acquire a potentiostat experiment. Meant to be subclassed
to by different experiment types and not used instanced directly. to by different experiment types and not used instanced directly.
""" """
......
...@@ -47,7 +47,7 @@ class InputError(Error): ...@@ -47,7 +47,7 @@ class InputError(Error):
self.expr = expr self.expr = expr
self.msg = msg self.msg = msg
class Main: class Main(object):
"""Main program """ """Main program """
def __init__(self): def __init__(self):
self.builder = gtk.Builder() self.builder = gtk.Builder()
......
...@@ -14,7 +14,7 @@ INVAL_CMD = "99" ...@@ -14,7 +14,7 @@ INVAL_CMD = "99"
RECV = 0 RECV = 0
SEND = 1 SEND = 1
class microdropConnection: class microdropConnection(object):
"""Manages microdrop connection over TCP with zmq""" """Manages microdrop connection over TCP with zmq"""
def __init__(self, port=6789): def __init__(self, port=6789):
"""Create zmq context and bind to port. Should be called manually """Create zmq context and bind to port. Should be called manually
......
...@@ -14,7 +14,7 @@ from matplotlib.backends.backend_gtkagg \ ...@@ -14,7 +14,7 @@ from matplotlib.backends.backend_gtkagg \
from matplotlib.backends.backend_gtkagg \ from matplotlib.backends.backend_gtkagg \
import NavigationToolbar2GTKAgg as NavigationToolbar import NavigationToolbar2GTKAgg as NavigationToolbar
class plotbox: class plotbox(object):
"""Contains main data plot and associated methods.""" """Contains main data plot and associated methods."""
def __init__(self, plotwindow_instance): def __init__(self, plotwindow_instance):
"""Creates plot and moves it to a gtk container. """Creates plot and moves it to a gtk container.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment