Python Forum

Full Version: Format tel hyperlink
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Here is a simple code snippet to format a tel hyperlink. this will display just the phone number otherwise it just prints out the whole <a href. Enjoy Smile
 
phoneNum = "1-999-555-1212"
phoneLink = "<a href='tel:19995551212'>" + phonNum + "</a>" 
#then we do this its for an mms app using Twilio
client.api.account.messages.create(
        to=number, from_= myTwilioNum,
        body="BlahBlah" + phoneNum + " more stuff: \n" +  someData + "\n" + someMoreData,
        media_url= "some.png") 
Will do