AYABKnitSettings Module

A dialog for the settings to knit.

class kniteditor.AYABKnitSettings.AYABKnitSettings(**kwargs)[source]

Bases: kivy.uix.boxlayout.BoxLayout

Class containing the settings to connect to the AYAB shield.

build()[source]

Build the UI for the first time.

colors_layout

the different colors chosen

communication

the Communication object to communicate with

comunication_connection

the DebugSerial or serial.Serial to use for communication

connection

the connection to communicate through

connection_button

the button to choose the connection with

connection_name

the name of the connection

display_message(title, message)[source]

Create a pop up error message.

See also

kivu.uix.popup

interaction

the Interaction object to interact with while knitting

list_of_actions

the list of actions to diaplay to the user

machine

the machine to use for knitting

machine_button

the button to choose the machines.

machine_name

the name of the machine

on_connection(instance, value)[source]

The connection changed so we need to adapt the machine text.

on_machine(instance, value)[source]

The machine changed so we need to adapt the machine text.

pattern_in_progress

the KnittingPatternWidget to display the pattern to knit and the progess

populate_actions(actions)[source]

Show the actions associted with the pattern.

populate_connections_drop_down()[source]

Add elements to the connection choice.

populate_drop_down(entries, attribute, location)[source]

Populate a drop down menu.

populate_machines_drop_down()[source]

Add elements to the machines choice.

popup

the Popup to display messages to the user

start_knitting(pattern)[source]

Start the knitting process with one pattern.

start_knitting_button

the Button to start and restart knitting with

stop()[source]

Stop the connections.

class kniteditor.AYABKnitSettings.DebugSerial(serial)[source]

Bases: object

A serial.Serial interface proxy that logs the communication.

__init__(serial)[source]

Create a new DebugSerial object.

Parameters:serial (serial.Serial) – the serial interface
__weakref__

list of weak references to the object (if defined)

read(*args)[source]

Read bytes from the serial and log them.

Parameters:args (tuple) – the arguments to pass on to the read method
Returns:the bytes read from the serial
Return type:bytes
write(bytes_)[source]

Write bytes to the serial and log them.

Parameters:bytes_ (bytes) – the bytes to write
class kniteditor.AYABKnitSettings.NullCommunication[source]

Bases: object

A null object pattern for communication.

__weakref__

list of weak references to the object (if defined)

stop()[source]

Do nothing.

class kniteditor.AYABKnitSettings.NullFile[source]

Bases: object

A null object pattern for files.

__weakref__

list of weak references to the object (if defined)

close()[source]

Do nothing.