I'm currently working with a Telit module (GT864-py) and I'm trying to extract numbers from a return value/string that I recieve when using AT-commands.
This is an example of the code that I'm using:
MDM.send('AT#ADC=1,2'+'\r', 5)
pump = MDM.receive(15)
pumpb = int(filter(str.isdigit, pump))
which gives the response
#ADC: 10 (This number can range from ~10-150)
OK
Now, I would like to filter the number after ADC, however, I have not yet found a solution as to how.
By using this code in PythonWin 1.5.2+ I get the following error:
NameError: isdigit
So I am assuming isdigit isn't supported in Python 1.5.2, is that correct? And if so, does anyone know any other ways to extract the numbers after #ADC: xxx ?
isdigitusingall, I suppose.alldoesn't exist either :-)