dutzi / tamper

Devtools extension, lets you locally edit files served from the web (based on mitmproxy).
http://dutzi.github.io/tamper
MIT License
394 stars 36 forks source link

Does not work with Python 3 #34

Closed jhftrifork closed 5 years ago

jhftrifork commented 9 years ago
> pip install tamper
Collecting tamper
  Using cached tamper-0.24.5.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/private/var/folders/_y/c52qvdjs6735275vt5swph2h0000gn/T/pip-build-1jx71wgv/tamper/setup.py", line 60
        print '\nWriting chrome native messaging manifest file (' + manifestFilename + ')'
                                                                ^
    SyntaxError: invalid syntax

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/_y/c52qvdjs6735275vt5swph2h0000gn/T/pip-build-1jx71wgv/tamper
jhftrifork commented 9 years ago

It's referring to this line: https://github.com/dutzi/tamper/blob/cfe52cf6d5e6ad7083a346f6d73769e5150579c3/mitmproxy-extension/setup.py#L60

jhftrifork commented 9 years ago

Okay, it's due to Python 3: https://docs.python.org/3.0/whatsnew/3.0.html#print-is-a-function

moming2k commented 8 years ago

Will the document or the main website specify require Python 2.7 ? Just wasted two days on try install on that. While it is can be simply fix by the below command

# if it is mac - start 
brew update
brew install pyenv
# if it is mac - end

pyenv install 2.7.11
pyenv global 2.7.11

# add below link to your .profile 
eval "$(pyenv init -)"

# restart the console 

pip install tamper
saiqulhaq commented 8 years ago

if you are using mac, you can use pip2.7 install tamper command

andersonvom commented 6 years ago

I have tested the above PR in both python 2 and 3 and it works as expected in both versions.

krokofant commented 6 years ago

Had to check this issue to know which python version to install 😕

davidemoro commented 5 years ago

If all works fine with python3 could you release on pypi a python3 compatible version please?