Formatting ndef.message
Hello guys! I hope this is the correct place to ask for help. I just installed nfcpy. I am wondering if there is a way to get just the "text" from the NDEF message? Here is just some example code I have.
import nfc
print 'Awaiting tag.'
with nfc.Contactless
tag = clf.connect(
s = tag.ndef.message
print s if tag.ndef else "Sorry, no NDEF"
here is the output:
pi@CoffeeTable:
Awaiting tag.
ÑTenHeather Marks
pi@CoffeeTable:
is there anyway to format "ÑTenHeather Marks" to just read "Heather Marks"? I tried standard python formatting s[3:] but that returns "[]". I am assuming it's because its formatted to some kind of record type. I appreciate any help you guys can give me.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- nfcpy Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Stephen Tiedemann
- Solved:
- Last query:
- Last reply: