forked from Advanced_Python/advanced-python-homework-2023
modified: equipment/turtle_device.py
modified: noblocking_turtle_shell.py
This commit is contained in:
parent
2479201b2a
commit
070fc3ab18
@ -39,7 +39,7 @@ class TurtleDevice(SynchronyDevice):
|
|||||||
if (attribute.startswith('_') == False)]
|
if (attribute.startswith('_') == False)]
|
||||||
|
|
||||||
self.actions = [TraitDescriptor(*ac) for ac in actions]
|
self.actions = [TraitDescriptor(*ac) for ac in actions]
|
||||||
return self.acions
|
return self.actions
|
||||||
|
|
||||||
def read(self, trait_name):
|
def read(self, trait_name):
|
||||||
collection = self.traits
|
collection = self.traits
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
import cmd
|
import cmd
|
||||||
import threading
|
import threading
|
||||||
|
from queue import Empty, Queue
|
||||||
from queue import Queue, Empty
|
|
||||||
|
|
||||||
from equipment.turtle_device import TurtleDevice
|
from equipment.turtle_device import TurtleDevice
|
||||||
|
|
||||||
|
|
||||||
@ -31,6 +29,7 @@ class NoBlockingTurtleShell(cmd.Cmd):
|
|||||||
file = None
|
file = None
|
||||||
|
|
||||||
def __init__(self, turtle_thread: TurtleDeviceThread):
|
def __init__(self, turtle_thread: TurtleDeviceThread):
|
||||||
|
super(NoBlockingTurtleShell, self).__init__()
|
||||||
self.turtle_thread = TurtleDeviceThread()
|
self.turtle_thread = TurtleDeviceThread()
|
||||||
|
|
||||||
def do_execute(self, arg):
|
def do_execute(self, arg):
|
||||||
|
Loading…
Reference in New Issue
Block a user