Edit return methods for API plugin example

This commit is contained in:
Joel Collins 2018-12-11 17:21:37 +00:00
parent 2fdabccfb0
commit 4cbfe16cc2

View file

@ -9,23 +9,20 @@ class FirstPlugin(MicroscopePlugin):
""" """
Demonstrate access to Microscope.camera, and Microscope.stage Demonstrate access to Microscope.camera, and Microscope.stage
""" """
print("Parent camera:")
print(self.microscope.camera)
print("Parent stage:") response = "My parent camera is {}, and my parent stage is {}.".format(self.microscope.camera, self.microscope.stage)
print(self.microscope.stage) return response
class OtherPlugin(MicroscopePlugin): class OtherPlugin(MicroscopePlugin):
""" """
An example of a second Microscope plugin, loaded from the same plugin file. An example of a second Microscope plugin, loaded from the same plugin file.
""" """
def run(self): def do_something(self):
""" """
Demonstrate access to Microscope.camera, and Microscope.stage Demonstrate access to Microscope.camera, and Microscope.stage
""" """
print("Stage plugin parent stage:") return "Stage plugin parent stage: {}".format(self.microscope.stage)
print(self.microscope.stage)
PLUGINS = { PLUGINS = {