Add support for py3.
This commit is contained in:
parent
032cfa1a8c
commit
5a763750d4
@ -11,6 +11,7 @@
|
|||||||
"""
|
"""
|
||||||
import re
|
import re
|
||||||
import ply.lex as lex
|
import ply.lex as lex
|
||||||
|
from six import string_types
|
||||||
|
|
||||||
from lesscpy.lib import dom
|
from lesscpy.lib import dom
|
||||||
from lesscpy.lib import css
|
from lesscpy.lib import css
|
||||||
@ -465,7 +466,7 @@ class LessLexer:
|
|||||||
Load lexer with content from `file` which can be a path or a file
|
Load lexer with content from `file` which can be a path or a file
|
||||||
like object.
|
like object.
|
||||||
"""
|
"""
|
||||||
if isinstance(file, basestring):
|
if isinstance(file, string_types):
|
||||||
with open(file) as f:
|
with open(file) as f:
|
||||||
self.lexer.input(f.read())
|
self.lexer.input(f.read())
|
||||||
else:
|
else:
|
||||||
|
@ -1 +1,2 @@
|
|||||||
ply
|
ply
|
||||||
|
six
|
||||||
|
Loading…
x
Reference in New Issue
Block a user