I want to make a small application in python, what what to do is to be in the background listening to the messages it receives, to forward them to another array.
I have a dictionary like this:
from_to_redir = {
"1447316562" : 1487212331, # 1-2
"1317723051" : 1308241218, # 3-4
"1287749122" : 1187924740, # 5-6
"1473192810" : 1197543096, #7-8
"1303515012" : 1330012567, #9-10
"1231992215" : 1262349386, #11-12
"1268998802" : 1411154699, #13-14
"1490320978" : 1402311342, #15-16
"1499511191" : 1246354970 #17-18
}
The print from_to_redir prints this:
{1447316562: 1487212331, 1317723051: 1308241218, 1287749122: 1187924740, 1473192810: 1197543096, 1303515012: 1330012567, 1231992215: 1262349386, 1268998802: 1411154699, 1490320978: 1402311342, 1499511191: 1246354970}
Right now I'm just trying to get each of the array's forwarding works, each group of numbers ("1447316562") refers to a chat, where the notifications from my sensors arrive, the number next to it, indicates where they have to redirect those messages.
My problem comes, and I do not know if it's because of the programming or the limitations of python, that when you get to the line of the array that you put (9-10) it no longer forwards anything, it's as if it broke, as if I was not able to get to the end of the array, and it's not really that each of the chats is constantly receiving, it's really from time to time, but I do not get it.
And I would like to use this project model, because of the ease of adding more sensors.
Thank you very much for your attention, we appreciate any contribution you can give me.
Greetings.