Mageia Bugzilla – Attachment 7193 Details for
Bug 17077
python-curl new use-after-free issue fixed upstream in 7.19.5.2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
testpy2.py - test script for python 2
testpy2.py (text/x-python), 329 bytes, created by
claire robinson
on 2015-11-10 18:37:38 CET
(
hide
)
Description:
testpy2.py - test script for python 2
Filename:
MIME Type:
Creator:
claire robinson
Created:
2015-11-10 18:37:38 CET
Size:
329 bytes
patch
obsolete
>import pycurl >from StringIO import StringIO > >buffer = StringIO() >c = pycurl.Curl() >c.setopt(c.URL, 'http://pycurl.sourceforge.net/') >c.setopt(c.WRITEDATA, buffer) >c.perform() >c.close() > >body = buffer.getvalue() ># Body is a string in some encoding. ># In Python 2, we can print it without knowing what the encoding is. >print(body)
import pycurl from StringIO import StringIO buffer = StringIO() c = pycurl.Curl() c.setopt(c.URL, 'http://pycurl.sourceforge.net/') c.setopt(c.WRITEDATA, buffer) c.perform() c.close() body = buffer.getvalue() # Body is a string in some encoding. # In Python 2, we can print it without knowing what the encoding is. print(body)
View Attachment As Raw
Actions:
View
Attachments on
bug 17077
: 7193 |
7194