0

I am trying to take in a string from a barcode scanner that is eight digits long. For example "12345678" and if the correct barcode is scanned, then a function is called. I would like to be able to advance automatically when the barcode is scanned instead of having to press enter afterwards. Does anyone know of something similar to msvcrt.getch() that would take in a full string instead of a single character? Or a workaround?

  • [Here](https://stackoverflow.com/a/54954154/2237151) is a way to limit the keyboard input to exactly `n` characters. As you say `press enter` I assume you have input on something like a keyboard so it might help – Pietro Sep 13 '21 at 15:05
  • Can you share the code you have written? – Tugay Sep 19 '21 at 23:01

0 Answers0