I can handle the Exception no problem.
The problem I have is that I want to issue the CTRL+C command upon hitting a certain device.
I cannot read the data until the CTRL+C command is sent and the tool exits..
I want to read the data and issue a CTRL+C command if that data is the data I require. in this instance 'device2'.
so my ideal solution is:
1. start command.
2. read each line and append to a list.
3. after each line is appended, check the list for 'device2'
4. if 'device2' is in that list, issue a CTRL+C command.
5. then I can assign that line to a variable and use it to update the firmware.
The problem I have is that I want to issue the CTRL+C command upon hitting a certain device.
I cannot read the data until the CTRL+C command is sent and the tool exits..
I want to read the data and issue a CTRL+C command if that data is the data I require. in this instance 'device2'.
so my ideal solution is:
1. start command.
2. read each line and append to a list.
3. after each line is appended, check the list for 'device2'
4. if 'device2' is in that list, issue a CTRL+C command.
5. then I can assign that line to a variable and use it to update the firmware.