2011-01-11 48 views
1

我正在嘗試使用https://github.com/simonwhitaker/PyAPNs來自動執行通知(Iphone)的系統。當你想發送一個通知時,你可以調用「apns.gateway_server.send_notification(key,payload)」,你必須輸入PEM口令。有沒有辦法通過代碼輸入這個短語?如何在調用方法之後在標準輸出中寫入(自動執行通知系統(Iphone))

喜歡的東西:電話(apns.gateway_server.send_notification(鍵,有效載荷),sys.stdout.write函數( 「我的phars」))

我不知道該怎麼辦呢

+0

您可能想嘗試在更具體的論壇中提問,例如關於您正在使用的圖書館的郵件列表。 – 2011-01-11 13:47:26

回答

0
import apns 

gate = apns.APNs('keyfile','certfile').gateway_server() 
gate.send_notification(key,payload) 

運行此操作時有問題嗎?

相關問題