|
|
@ -13,10 +13,10 @@
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
# limitations under the License.
|
|
|
|
from __future__ import absolute_import
|
|
|
|
# from __future__ import absolute_import
|
|
|
|
from .output import BaseOutput, BasePositionOutput
|
|
|
|
from .output import BaseOutput, BasePositionOutput
|
|
|
|
from calculate.lib.utils.text import _uu8
|
|
|
|
from calculate.lib.utils.text import _uu8
|
|
|
|
|
|
|
|
from io import IOBase
|
|
|
|
|
|
|
|
|
|
|
|
class Print(object):
|
|
|
|
class Print(object):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
@ -28,7 +28,7 @@ class Print(object):
|
|
|
|
self.output = output
|
|
|
|
self.output = output
|
|
|
|
self.position_controller = position_controller
|
|
|
|
self.position_controller = position_controller
|
|
|
|
self.buffer = []
|
|
|
|
self.buffer = []
|
|
|
|
if isinstance(printfunc, file):
|
|
|
|
if isinstance(printfunc, IOBase):
|
|
|
|
self.printfunc = printfunc.write
|
|
|
|
self.printfunc = printfunc.write
|
|
|
|
self.flush = printfunc.flush
|
|
|
|
self.flush = printfunc.flush
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|