PIL can't read binary

2014-09-23 Thread Frank Liou
I use PIL Image.open() but it show 'list' object has no attribute 'open' this is my code class Image2(): trans = connection.begin() session = Session() ProductId = session.query(ProductEntity.ProductId).filter(ProductEntity.CompanyId=="2").all() Image = session.query(ProductI

Re: Python Crypto Singature do not support Android???

2014-09-05 Thread Frank Liou
Sorry!! here is my code python : msg = '123' msg = msg.encode('utf-8') digest = SHA.new(msg).digest() signature = APP_key_Private.sign(digest, '') signature like: (3313609575189770456309776952388055366479183814159935747487353823698464644111856144652004406811762087026328804664486509214841694613

Python Crypto Singature do not support Android???

2014-09-05 Thread Frank Liou
I use Privatekey sign a signature by android and then send to python python can't use public key to verify and python signature result all is number but android is number and english words is that no support?? -- https://mail.python.org/mailman/listinfo/python-list

Re: python 3.4 use python-gcm can't import

2014-08-29 Thread Frank Liou
what? So...My 3.4 can't use this package? now i use http.client reg_ids = [] reg_ids.append(GetCustomerGCMId[0]) API_KEY = 'xxx' mydata = {'registration_ids': reg_ids, 'data': data} jqs = json.dumps(mydata)

python 3.4 use python-gcm can't import

2014-08-28 Thread Frank Liou
i just from gcm import GCM then Traceback (most recent call last): File "C:/Users/frank/Desktop/SinyiAPI/SinyiAPI.py", line 7, in from Model.Order import Order File "C:\Users\frank\Desktop\SinyiAPI\Model\Order.py", line 7, in from gcm.gcm import GCM File "", line 2237, in _find_and_load

how can i get "body" values?

2014-07-11 Thread Frank Liou
how can i get body values use variable to Separate catch? https://lh3.googleusercontent.com/-6Ywp4GukuCM/U7-vhF0nzuI/Bv4/Ovcr1O2FScs/s1600/321.jpg i want to catch name and key values now i use request.data i can catch all the body but how can i use variable to separate and catch? --

base64 convert to binary by binascii is that right?

2014-07-11 Thread Frank Liou
conn = engine.connect() encoded = base64.b64encode(getbody) binary_string = binascii.a2b_base64(encoded) puresql = sqla.text("INSERT INTO friends(name) VALUES(:binary_string)") conn.execute(puresql,binary_string = binary_string) first getbody trans to base64 then i convert t

Re: How can i get http body??

2014-07-10 Thread Frank Liou
Got it Thanks you -- https://mail.python.org/mailman/listinfo/python-list

How can i get http body??

2014-07-09 Thread Frank Liou
https://lh5.googleusercontent.com/-6t5tmr5T4Ys/U74FdF128oI/Bvo/bYyaHzsdw9Q/s1600/%E6%9C%AA%E5%91%BD%E5%90%8D.jpg how can i catch the "body" when i was post ?? i want to catch body to my database and encode to base64 def hello(username): if request.method=='POST': pos

Re: same code same tables but not the same result(use flask and postgres)

2014-07-09 Thread Frank Liou
oh by the way one of database version is postgres 80420 another is 90304 80420 is fine but 90304 is so strange -- https://mail.python.org/mailman/listinfo/python-list

Re: same code same tables but not the same result(use flask and postgres)

2014-07-09 Thread Frank Liou
Hi ChrisA i use same workspace all the same python 3.3 -- https://mail.python.org/mailman/listinfo/python-list

same code same tables but not the same result(use flask and postgres)

2014-07-09 Thread Frank Liou
i use flask connect to postgres def post_insert(username): conn = engine.connect() encoded = base64.b64encode(username.encode('utf-8')) puresql = sqla.text("INSERT INTO friends(name) VALUES(:encoded)") conn.execute(puresql,encoded = encoded) i insert username encode with base64 t

Re: flask sql cann't insert Variable in VALUES

2014-07-06 Thread Frank Liou
Thank you CA learn so much from your words -- https://mail.python.org/mailman/listinfo/python-list

flask sql cann't insert Variable in VALUES

2014-07-04 Thread Frank Liou
I try to insert username in to my table it show Internal Server Error The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application. it maybe mean no request i try to change username to '123123' then

Re: Is pip being automatically installed for Python 3.4.0?

2014-07-02 Thread Frank Liou
it's truth pip will be automatically install Python3.4.0 if you want to use another version you should use wget -- https://mail.python.org/mailman/listinfo/python-list

Re: How can I catch values from other def by flask???

2014-07-02 Thread Frank Liou
Steven Thank you!!! it's work i'm so appreciate that hava a nice day^^ -- https://mail.python.org/mailman/listinfo/python-list