i got a script by name students.py
the code is this
import time
import keyboard as kb
import random
import numpy as np
while True:
Students = ["Nishesh","Anshika","Naincy","Geeta","Rajneesh"]
exitcon = ["close","exit","Quit","quit","Exit","Close"]
maxrn = len(Students)
Marks = [100,2,100,100,100]
uinnput = input("Enter Roll no of students : ")
if uinnput in exitcon:
break
if uinnput.isdigit():
if uinnput > "0" and uinnput < "6":
rn = int(uinnput) - 1
print(Students[rn]," : " , Marks[rn])
else:
print("Please enter a number between 1 and ",maxrn)
else:
print("Please enter a number between 1 and ",maxrn)
its a pretty simple script and I converted it to exe but with pyinstallerand when i run the exe it gives this error
Traceback (most recent call last): File "students.py", line 10, in <module> RuntimeError: input(): lost sys.stdin
it works fine in when running the python file with cmd but this exe isn't