i had to create a python program to read fingerprint sensor that works well on linux, Now i want the same code to run i windows but there is a problem with port, how to manage or access usb devices in windows with python. in brief how do i update my code so that it works on windows(f = PyFingerprint('/dev/ttyUSB0', 57600, 0xFFFFFFFF, 0x00000000))
import time
from pyfingerprint.pyfingerprint import PyFingerprint
from func import registerNewPerson
def runEnroll():
    ## Enrolls new finger
    ##
    ## Tries to initialize the sensor
    try:
        f = PyFingerprint('/dev/ttyUSB0', 57600, 0xFFFFFFFF, 0x00000000)
        if ( f.verifyPassword() == False ):
            raise ValueError('The given fingerprint sensor password is wrong!')
    except Exception as e:
        print("Le capteur D'empreunte n'a pas pu etre initialise!")
        print('Exception message: ' + str(e))
        exit(1)
 codé Facil • edited Aug 21, 2020 by (unknown user)
 codé Facil • edited Aug 21, 2020 by (unknown user)User contributions licensed under CC BY-SA 3.0