Commit 6c78889d authored by fendouai's avatar fendouai

add compatibility to readme

parent 3ff1f3fb
...@@ -5,6 +5,12 @@ ...@@ -5,6 +5,12 @@
对应的 REST API 文档:<http://docs.jpush.io/server/rest_api_v3_push/> 对应的 REST API 文档:<http://docs.jpush.io/server/rest_api_v3_push/>
## 兼容版本
Python 2.7
Python 3 还没有兼容,以后会兼容。
建议 Python3 的开发者继续使用 jpush 3.1.2,pip 地址:
> https://pypi.python.org/pypi?:action=display&name=jpush&version=3.1.2
## 环境配置 ## 环境配置
pip 方式: pip 方式:
......
...@@ -18,6 +18,6 @@ except common.Unauthorized: ...@@ -18,6 +18,6 @@ except common.Unauthorized:
except common.APIConnectionException: except common.APIConnectionException:
raise common.APIConnectionException("conn") raise common.APIConnectionException("conn")
except common.JPushFailure: except common.JPushFailure:
print "JPushFailure" print ("JPushFailure")
except: except:
print "Exception" print ("Exception")
\ No newline at end of file \ No newline at end of file
...@@ -72,7 +72,7 @@ class JPush(object): ...@@ -72,7 +72,7 @@ class JPush(object):
if (level == "NOTSET"): if (level == "NOTSET"):
logging.basicConfig(level=logging.NOTSET) logging.basicConfig(level=logging.NOTSET)
else: else:
print "set logging level failed ,the level is invalid." print ("set logging level failed ,the level is invalid.")
def create_push(self): def create_push(self):
"""Create a Push notification.""" """Create a Push notification."""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment