Is there a new/updated Twill?

前端 未结 4 1774
遇见更好的自我
遇见更好的自我 2020-12-30 09:36

I\'ve been trying to learn Twill Scripting on Python and I am using Python 3.4 and Twill 1.8.0. Been reading some posts here and I found it interesting to s

相关标签:
4条回答
  • 2020-12-30 09:44

    Have you tried to install twill3?

    pip install twill3
    
    0 讨论(0)
  • 2020-12-30 09:47

    I just found the answer. Thanks for viewing this question and probably for that downvote (SAD FACE).. So, the solution that I found was to use the 2to3 Script Tool found in Python Folder. Basically, it refactors Python 2 codes to Python 3 codes.

    0 讨论(0)
  • 2020-12-30 09:49

    Well, Twill 2.0 is released with support of the modern python revisions

    Twill 2.0 Release Info Page

    0 讨论(0)
  • 2020-12-30 10:05

    GMs answer only partly solved the problem for me (using Python 3.6 on Windows). Downloading Twill 1.8.0 and converting it with 2to3 was only the first step.

    Afterwards, I had to install missing packages:

    pip install lxml
    pip install requests
    pip install pypiwin32
    pip install cssselect
    

    Furthermore, I had to fix two files in Python36/lib/site-packages/twill/other_packages/: In subprocess.py, I removed the section with False = 0 at line 392 and changed if 0: to if 1: in line 353 to avoid using _subprocess. Finally, in pyparsing.py, I replaced .lowercase with .lower() and .uppercase with .upper().

    0 讨论(0)
提交回复
热议问题