Try changing these lines:
p=list(find(fd, ",")) q=list(find(fd, '\r')) MsgNo=fd[p[0]+1:q[1]]
With the following:
P=fd.index(“,”)q=fd.index(“\r”)MsgNo=fd[p:q]
Try changing these lines:
p=list(find(fd, ",")) q=list(find(fd, '\r')) MsgNo=fd[p[0]+1:q[1]]
With the following:
P=fd.index(“,”)q=fd.index(“\r”)MsgNo=fd[p:q]