pi サイトの debian イメージを使用した真新しいラズベリー pi。
Sudo apt-get install python-pycurl を使用しました
私のスクリプトは次のようになります
import pycurl
c = pycurl.Curl()
c.setopt(c.POST, 1)
c.setopt(c.SSL_VERIFYPEER, 1)
c.setopt(c.CAINFO, '/etc/ssl/certs/ca-certificates.crt')
c.setopt(c.URL, 'https://theurl.com')
c.setopt(c.USERPWD, 'user:pass')
c.setopt(c.POSTFIELDS, 'Field1=This&Field2=That')
c.perform()
私はこれを取得しています
Traceback (most recent call last):
File "pycurl.py", line 1, in <module>
import pycurl
File "/home/pi/test/pycurl.py", line 3, in <module>
c = pycurl.Curl()
AttributeError: 'module' object has no attribute 'Curl'