← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #222395]: HowTo use Python module requests in Sikuli (POST https )

 

Question #222395 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/222395

    Status: Open => Answered

RaiMan proposed the following answer:
It is not because of the language level, but because of a general
difference between Python and Jython:

the usage of:
try:
    .....
except xxx as e:
    ....

is not supported in Jython as it is used in 
requests\packages\urllib3\connectionpool.py

and leads to a syntax error.
So you cannot use it with Sikuli.

You have to step down to urllib2, which is available in Jython/Sikuli.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.