diff --git a/lslopt/lslbasefuncs.py b/lslopt/lslbasefuncs.py index 1ebacca..d0891d1 100644 --- a/lslopt/lslbasefuncs.py +++ b/lslopt/lslbasefuncs.py @@ -475,7 +475,7 @@ def InternalUTF8toString(s): # NOTE: Without the above line, the following one hits a bug in # python-coverage. It IS executed but not detected. continue - if LSO: + if lslcommon.LSO: raise ELSONotSupported(u"Byte strings not supported") ret += u'?' * len(partialchar) partialchar = b'' @@ -484,14 +484,14 @@ def InternalUTF8toString(s): partialchar = c pending = 1 if o < 0xE0 else 2 if o < 0xF0 else 3 elif o >= 0x80: - if LSO: + if lslcommon.LSO: raise ELSONotSupported(u"Byte strings not supported") ret += u'?' else: ret += c.decode('utf8') if partialchar: - if LSO: + if lslcommon.LSO: raise ELSONotSupported(u"Byte strings not supported") ret += u'?' * len(partialchar) diff --git a/lslopt/lslextrafuncs.py b/lslopt/lslextrafuncs.py index 3014d2e..eff308e 100644 --- a/lslopt/lslextrafuncs.py +++ b/lslopt/lslextrafuncs.py @@ -17,9 +17,10 @@ # Extra functions that have predictable return values for certain arguments. -from lslcommon import * +import lslcommon +from lslcommon import Key #, Vector, Quaternion from lslbasefuncs import ELSLCantCompute, isinteger, iskey, islist, \ - isvector, isstring, NULL_KEY, ZERO_VECTOR, ZERO_ROTATION + isvector, isstring, NULL_KEY, ZERO_VECTOR, ZERO_ROTATION, cond #isfloat, isrotation TouchEvents = ('touch', 'touch_start', 'touch_end') diff --git a/lslopt/lsloutput.py b/lslopt/lsloutput.py index 16a09b5..2d00d03 100644 --- a/lslopt/lsloutput.py +++ b/lslopt/lsloutput.py @@ -18,7 +18,8 @@ # Convert an abstract syntax tree + symbol table back to a script as text. import lslfuncs -from lslcommon import * +import lslcommon +from lslcommon import Key, Vector, Quaternion from lslparse import warning import math @@ -426,7 +427,7 @@ class outscript(object): if nt == 'EXPR': return self.dent() + self.OutExpr(child[0]) + ( - ';\n' if not IsCalc else '') + ';\n' if not lslcommon.IsCalc else '') if nt == 'LAMBDA': return '' diff --git a/lslopt/lslparse.py b/lslopt/lslparse.py index 5c1fca5..7719eef 100644 --- a/lslopt/lslparse.py +++ b/lslopt/lslparse.py @@ -20,7 +20,7 @@ # TODO: Add info to be able to propagate error position to the source. -from lslcommon import * +from lslcommon import Key, Vector, Quaternion import lslcommon import lslfuncs import sys, re @@ -2621,7 +2621,7 @@ list lazy_list_set(list L, integer i, list v) self.linestart = True self.tok = self.GetToken() - self.globals = self.BuildTempGlobalsTable() if not IsCalc \ + self.globals = self.BuildTempGlobalsTable() if not lslcommon.IsCalc \ else self.funclibrary.copy() # Restart @@ -2636,7 +2636,7 @@ list lazy_list_set(list L, integer i, list v) self.usedspots = 0 # Start the parsing proper - if IsCalc: + if lslcommon.IsCalc: self.Parse_single_expression() else: self.Parse_script()