Skip to content

Safe open #81

@yakir12

Description

@yakir12

Is there some way I can open a port (i.e. "/dev/ttyACM0") "safely"? Alternatively, test to see if a port is already open? Currently I can only do:

isopen(sp)

but this only works for a SerialPort type, that has already been opened before (and maybe closed at some point). My point is, if you don't know what ports are available, open, or closed, you can only start from get_port_list(), which gives you a list of strings. How can I, from that point, safely test if a port is already open, so I'll know to close it before attempting to open it again?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions