Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a new/updated Twill?

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 study. But, I do have a problem installing Twill. I just knew that PRINT in Python is now a function so meaning it needs parenthesis and that's where my problem starts. As I look through the codes on Twill 1.8.0, I think it isn't oriented with the change of using PRINT yet. Strings are not enclosed with parenthesis so I was thinking maybe there is a new patch or version of Twill that adapts the changes of Python, is there any? or is there anything I can do about this aside from manually editing Twill files?

Your response is highly appreciated.

like image 440
GM-Xile GM-Xile Avatar asked Jun 05 '14 08:06

GM-Xile GM-Xile


3 Answers

Have you tried to install twill3?

pip install twill3
like image 153
Urban P. Avatar answered Oct 07 '22 10:10

Urban P.


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().

like image 45
CGFoX Avatar answered Oct 07 '22 08:10

CGFoX


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

Twill 2.0 Release Info Page

Well, Twill 3 is also here - Twill 3

like image 45
Gleb S Avatar answered Oct 07 '22 08:10

Gleb S