RonenNess / html_validator

Offline HTML validator for Python, based on the standard v.Nu
MIT License
6 stars 5 forks source link

Python 3.x compatibility #2

Closed ronnix closed 6 years ago

ronnix commented 6 years ago

In Python 2.7:

>>> import html_validator

In Python 3.6:

>>> import html_validator
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/site-packages/html_validator/__init__.py", line 10, in <module>
    from html_validator import validate, MissingValidatorOrJava, MissingHtmlFile, ValidationError
ImportError: cannot import name 'validate'
RonenNess commented 6 years ago

Hi @ronnix ,

I wrote it for py2.7 it doesn't work on 3 (tbh not sure why, its some weird import issue but I didn't look much into it).

Anyway you can just copy the code and it should work, as seen here: https://github.com/RonenNess/html_validator/issues/1

If you want to make a PR for py3 that would be appreciated.

Thanks :)