From 560e882da0543a4b5172e8a23181f7caed3b1910 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Wed, 30 May 2018 15:54:14 +0300 Subject: [PATCH] - made sure FlatCAM use python3 in Linux (JP's find) - cgi module is deprecated in Python3, using the recommended module html as replacement --- flatcam | 2 +- termwidget.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flatcam b/flatcam index 3c5ef0bf..fb3daa8c 100755 --- a/flatcam +++ b/flatcam @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 ############################################################ # FlatCAM: 2D Post-processing for Manufacturing # # http://flatcam.org # diff --git a/termwidget.py b/termwidget.py index 41433bed..66ea3f03 100644 --- a/termwidget.py +++ b/termwidget.py @@ -3,7 +3,7 @@ Terminal emulator widget. Shows intput and output text. Allows to enter commands. Supports history. """ -import cgi +import html from PyQt4.QtCore import pyqtSignal, Qt from PyQt4.QtGui import QColor, QKeySequence, QLineEdit, QPalette, \ QSizePolicy, QTextCursor, QTextEdit, \ @@ -152,7 +152,7 @@ class TermWidget(QWidget): """ assert style in ('in', 'out', 'err') - text = cgi.escape(text) + text = html.escape(text) text = text.replace('\n', '
') if style == 'in':