From 9c707e06824fea649dc896a4aceb2e4da6f3abe7 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Mon, 18 May 2020 19:09:37 +0300 Subject: [PATCH] - solved a circular import --- AppEditors/FlatCAMGeoEditor.py | 2 +- AppEditors/FlatCAMGrbEditor.py | 2 +- AppParsers/ParseExcellon.py | 5 ++--- AppParsers/ParseGerber.py | 3 +-- AppParsers/ParseHPGL2.py | 5 ++--- AppTools/AppTool.py => AppTool.py | 5 ++--- AppTools/ToolAlignObjects.py | 2 +- AppTools/ToolCalculators.py | 2 +- AppTools/ToolCalibration.py | 2 +- AppTools/ToolCopperThieving.py | 4 ++-- AppTools/ToolCorners.py | 2 +- AppTools/ToolCutOut.py | 2 +- AppTools/ToolDblSided.py | 2 +- AppTools/ToolDistance.py | 2 +- AppTools/ToolDistanceMin.py | 2 +- AppTools/ToolExtractDrills.py | 2 +- AppTools/ToolFiducials.py | 2 +- AppTools/ToolFilm.py | 2 +- AppTools/ToolImage.py | 2 +- AppTools/ToolInvertGerber.py | 2 +- AppTools/ToolMove.py | 2 +- AppTools/ToolNCC.py | 4 ++-- AppTools/ToolOptimal.py | 4 ++-- AppTools/ToolPDF.py | 6 +++--- AppTools/ToolPaint.py | 5 ++--- AppTools/ToolPanelize.py | 5 +++-- AppTools/ToolPcbWizard.py | 2 +- AppTools/ToolProperties.py | 2 +- AppTools/ToolPunchGerber.py | 2 +- AppTools/ToolQRCode.py | 2 +- AppTools/ToolRulesCheck.py | 2 +- AppTools/ToolSolderPaste.py | 4 ++-- AppTools/ToolSub.py | 2 +- AppTools/ToolTransform.py | 2 +- App.py => App_Main.py | 5 ++++- CHANGELOG.md | 1 + Common.py | 2 +- FlatCAM.py | 2 +- camlib.py | 3 +-- tclCommands/TclCommand.py | 4 ++-- 40 files changed, 56 insertions(+), 57 deletions(-) rename AppTools/AppTool.py => AppTool.py (98%) rename App.py => App_Main.py (99%) diff --git a/AppEditors/FlatCAMGeoEditor.py b/AppEditors/FlatCAMGeoEditor.py index 679f5f03..da5c9613 100644 --- a/AppEditors/FlatCAMGeoEditor.py +++ b/AppEditors/FlatCAMGeoEditor.py @@ -15,7 +15,7 @@ from PyQt5 import QtGui, QtCore, QtWidgets from PyQt5.QtCore import Qt, QSettings from camlib import distance, arc, three_point_circle, Geometry, FlatCAMRTreeStorage -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.GUIElements import OptionalInputSection, FCCheckBox, FCEntry, FCComboBox, FCTextAreaRich, \ FCDoubleSpinner, FCButton, FCInputDialog, FCTree from AppParsers.ParseFont import * diff --git a/AppEditors/FlatCAMGrbEditor.py b/AppEditors/FlatCAMGrbEditor.py index 0fdb8b8d..68d1de6c 100644 --- a/AppEditors/FlatCAMGrbEditor.py +++ b/AppEditors/FlatCAMGrbEditor.py @@ -20,7 +20,7 @@ import logging from camlib import distance, arc, three_point_circle from AppGUI.GUIElements import FCEntry, FCComboBox, FCTable, FCDoubleSpinner, FCSpinner, RadioSet, \ EvalEntry2, FCInputDialog, FCButton, OptionalInputSection, FCCheckBox -from AppTools.AppTool import AppTool +from AppTool import AppTool import numpy as np from numpy.linalg import norm as numpy_norm diff --git a/AppParsers/ParseExcellon.py b/AppParsers/ParseExcellon.py index d853b427..fbf1bb6f 100644 --- a/AppParsers/ParseExcellon.py +++ b/AppParsers/ParseExcellon.py @@ -6,7 +6,7 @@ # MIT Licence # # ########################################################## ## -from camlib import Geometry +from camlib import Geometry, grace import shapely.affinity as affinity from shapely.geometry import Point, LineString @@ -17,8 +17,7 @@ import logging import traceback from copy import deepcopy -import AppTranslation as fcTranslate -from Common import GracefulException as grace +# import AppTranslation as fcTranslate import gettext import builtins diff --git a/AppParsers/ParseGerber.py b/AppParsers/ParseGerber.py index e17fd5d2..1bd37e91 100644 --- a/AppParsers/ParseGerber.py +++ b/AppParsers/ParseGerber.py @@ -1,5 +1,5 @@ from PyQt5 import QtWidgets -from camlib import Geometry, arc, arc_angle, ApertureMacro +from camlib import Geometry, arc, arc_angle, ApertureMacro, grace import numpy as np import re @@ -15,7 +15,6 @@ from shapely.geometry import box as shply_box, Polygon, LineString, Point, Multi from lxml import etree as ET from AppParsers.ParseSVG import svgparselength, getsvggeo -from Common import GracefulException as grace import AppTranslation as fcTranslate import gettext diff --git a/AppParsers/ParseHPGL2.py b/AppParsers/ParseHPGL2.py index e9eafac5..200453b0 100644 --- a/AppParsers/ParseHPGL2.py +++ b/AppParsers/ParseHPGL2.py @@ -6,7 +6,7 @@ # MIT Licence # # ############################################################ -from camlib import arc, three_point_circle +from camlib import arc, three_point_circle, grace import numpy as np import re @@ -18,8 +18,7 @@ import sys from shapely.ops import unary_union from shapely.geometry import LineString, Point -from Common import GracefulException as grace -import AppTranslation as fcTranslate +# import AppTranslation as fcTranslate import gettext import builtins diff --git a/AppTools/AppTool.py b/AppTool.py similarity index 98% rename from AppTools/AppTool.py rename to AppTool.py index 4c5bd22c..8391d76d 100644 --- a/AppTools/AppTool.py +++ b/AppTool.py @@ -27,7 +27,7 @@ class AppTool(QtWidgets.QWidget): """ :param app: The application this tool will run in. - :type app: App.App + :type app: App_Main.App :param parent: Qt Parent :return: AppTool """ @@ -284,8 +284,7 @@ class AppTool(QtWidgets.QWidget): def confirmation_message_int(self, accepted, minval, maxval): if accepted is False: - self.app.inform.emit('[WARNING_NOTCL] %s: [%d, %d]' % - (_("Edited value is out of range"), minval, maxval)) + self.app.inform.emit('[WARNING_NOTCL] %s: [%d, %d]' % (_("Edited value is out of range"), minval, maxval)) else: self.app.inform.emit('[success] %s' % _("Edited value is within limits.")) diff --git a/AppTools/ToolAlignObjects.py b/AppTools/ToolAlignObjects.py index 542d27f8..35e956c4 100644 --- a/AppTools/ToolAlignObjects.py +++ b/AppTools/ToolAlignObjects.py @@ -6,7 +6,7 @@ # ########################################################## from PyQt5 import QtWidgets, QtCore -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.GUIElements import FCComboBox, RadioSet diff --git a/AppTools/ToolCalculators.py b/AppTools/ToolCalculators.py index 247b5003..08edc27d 100644 --- a/AppTools/ToolCalculators.py +++ b/AppTools/ToolCalculators.py @@ -6,7 +6,7 @@ # ########################################################## from PyQt5 import QtWidgets -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.GUIElements import FCSpinner, FCDoubleSpinner, FCEntry import math diff --git a/AppTools/ToolCalibration.py b/AppTools/ToolCalibration.py index 8071faa4..b808f00c 100644 --- a/AppTools/ToolCalibration.py +++ b/AppTools/ToolCalibration.py @@ -7,7 +7,7 @@ from PyQt5 import QtWidgets, QtCore, QtGui -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.GUIElements import FCDoubleSpinner, EvalEntry, FCCheckBox, OptionalInputSection, FCEntry from AppGUI.GUIElements import FCTable, FCComboBox, RadioSet from AppEditors.FlatCAMTextEditor import TextEditor diff --git a/AppTools/ToolCopperThieving.py b/AppTools/ToolCopperThieving.py index fa0ce728..d7da7b05 100644 --- a/AppTools/ToolCopperThieving.py +++ b/AppTools/ToolCopperThieving.py @@ -7,8 +7,8 @@ from PyQt5 import QtWidgets, QtCore -from Common import GracefulException as grace -from AppTools.AppTool import AppTool +from camlib import grace +from AppTool import AppTool from AppGUI.GUIElements import FCDoubleSpinner, RadioSet, FCEntry, FCComboBox import shapely.geometry.base as base diff --git a/AppTools/ToolCorners.py b/AppTools/ToolCorners.py index f8969cd2..8cd6cf79 100644 --- a/AppTools/ToolCorners.py +++ b/AppTools/ToolCorners.py @@ -7,7 +7,7 @@ from PyQt5 import QtWidgets, QtCore -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.GUIElements import FCDoubleSpinner, FCCheckBox, FCComboBox, FCButton from shapely.geometry import MultiPolygon, LineString diff --git a/AppTools/ToolCutOut.py b/AppTools/ToolCutOut.py index 25e11390..196da2b6 100644 --- a/AppTools/ToolCutOut.py +++ b/AppTools/ToolCutOut.py @@ -6,7 +6,7 @@ # ########################################################## from PyQt5 import QtWidgets, QtGui, QtCore -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.GUIElements import FCDoubleSpinner, FCCheckBox, RadioSet, FCComboBox, OptionalInputSection, FCButton from shapely.geometry import box, MultiPolygon, Polygon, LineString, LinearRing diff --git a/AppTools/ToolDblSided.py b/AppTools/ToolDblSided.py index 817c87d6..23bb781f 100644 --- a/AppTools/ToolDblSided.py +++ b/AppTools/ToolDblSided.py @@ -1,7 +1,7 @@ from PyQt5 import QtWidgets, QtCore -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.GUIElements import RadioSet, FCDoubleSpinner, EvalEntry, FCEntry, FCButton, FCComboBox from numpy import Inf diff --git a/AppTools/ToolDistance.py b/AppTools/ToolDistance.py index e20ebd36..6798ae8e 100644 --- a/AppTools/ToolDistance.py +++ b/AppTools/ToolDistance.py @@ -7,7 +7,7 @@ from PyQt5 import QtWidgets, QtCore -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.VisPyVisuals import * from AppGUI.GUIElements import FCEntry, FCButton, FCCheckBox diff --git a/AppTools/ToolDistanceMin.py b/AppTools/ToolDistanceMin.py index 1ea67ea7..0e932863 100644 --- a/AppTools/ToolDistanceMin.py +++ b/AppTools/ToolDistanceMin.py @@ -6,7 +6,7 @@ # ########################################################## from PyQt5 import QtWidgets, QtCore -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.GUIElements import FCEntry from shapely.ops import nearest_points diff --git a/AppTools/ToolExtractDrills.py b/AppTools/ToolExtractDrills.py index 2d3802cc..71e8fb41 100644 --- a/AppTools/ToolExtractDrills.py +++ b/AppTools/ToolExtractDrills.py @@ -7,7 +7,7 @@ from PyQt5 import QtWidgets, QtCore -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, FCComboBox from shapely.geometry import Point diff --git a/AppTools/ToolFiducials.py b/AppTools/ToolFiducials.py index 6a482972..d6f44a5d 100644 --- a/AppTools/ToolFiducials.py +++ b/AppTools/ToolFiducials.py @@ -7,7 +7,7 @@ from PyQt5 import QtWidgets, QtCore -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.GUIElements import FCDoubleSpinner, RadioSet, EvalEntry, FCTable, FCComboBox from shapely.geometry import Point, Polygon, MultiPolygon, LineString diff --git a/AppTools/ToolFilm.py b/AppTools/ToolFilm.py index 81bf6779..3fb079ed 100644 --- a/AppTools/ToolFilm.py +++ b/AppTools/ToolFilm.py @@ -7,7 +7,7 @@ from PyQt5 import QtCore, QtWidgets -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, \ OptionalHideInputSection, OptionalInputSection, FCComboBox, FCFileSaveDialog diff --git a/AppTools/ToolImage.py b/AppTools/ToolImage.py index 68b3a7e7..5d520c78 100644 --- a/AppTools/ToolImage.py +++ b/AppTools/ToolImage.py @@ -7,7 +7,7 @@ from PyQt5 import QtGui, QtWidgets -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.GUIElements import RadioSet, FCComboBox, FCSpinner import gettext diff --git a/AppTools/ToolInvertGerber.py b/AppTools/ToolInvertGerber.py index e6ea29d5..6acc013b 100644 --- a/AppTools/ToolInvertGerber.py +++ b/AppTools/ToolInvertGerber.py @@ -7,7 +7,7 @@ from PyQt5 import QtWidgets, QtCore -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.GUIElements import FCButton, FCDoubleSpinner, RadioSet, FCComboBox from shapely.geometry import box diff --git a/AppTools/ToolMove.py b/AppTools/ToolMove.py index 866555f9..e02fed57 100644 --- a/AppTools/ToolMove.py +++ b/AppTools/ToolMove.py @@ -6,7 +6,7 @@ # ########################################################## from PyQt5 import QtWidgets, QtCore -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.VisPyVisuals import * from copy import copy diff --git a/AppTools/ToolNCC.py b/AppTools/ToolNCC.py index 1f323ccb..b11fee4b 100644 --- a/AppTools/ToolNCC.py +++ b/AppTools/ToolNCC.py @@ -7,12 +7,12 @@ from PyQt5 import QtWidgets, QtCore, QtGui -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.GUIElements import FCCheckBox, FCDoubleSpinner, RadioSet, FCTable, FCInputDialog, FCButton,\ FCComboBox, OptionalInputSection from AppParsers.ParseGerber import Gerber -from Common import GracefulException as grace +from camlib import grace from copy import deepcopy diff --git a/AppTools/ToolOptimal.py b/AppTools/ToolOptimal.py index cc2b6a3d..1733edc6 100644 --- a/AppTools/ToolOptimal.py +++ b/AppTools/ToolOptimal.py @@ -7,9 +7,9 @@ from PyQt5 import QtWidgets, QtCore, QtGui -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.GUIElements import OptionalHideInputSection, FCTextArea, FCEntry, FCSpinner, FCCheckBox, FCComboBox -from Common import GracefulException as grace +from camlib import grace from shapely.geometry import MultiPolygon from shapely.ops import nearest_points diff --git a/AppTools/ToolPDF.py b/AppTools/ToolPDF.py index 2f105d57..4b4e88ad 100644 --- a/AppTools/ToolPDF.py +++ b/AppTools/ToolPDF.py @@ -7,9 +7,9 @@ from PyQt5 import QtWidgets, QtCore -from AppTools.AppTool import AppTool -from Common import GracefulException as grace -from AppParsers.ParsePDF import PdfParser +from AppTool import AppTool + +from AppParsers.ParsePDF import PdfParser, grace from shapely.geometry import Point, MultiPolygon from shapely.ops import unary_union diff --git a/AppTools/ToolPaint.py b/AppTools/ToolPaint.py index 7b605e8a..7673acc8 100644 --- a/AppTools/ToolPaint.py +++ b/AppTools/ToolPaint.py @@ -8,13 +8,12 @@ from PyQt5 import QtWidgets, QtGui, QtCore from PyQt5.QtCore import Qt -from AppTools.AppTool import AppTool +from AppTool import AppTool from copy import deepcopy # from ObjectCollection import * from AppParsers.ParseGerber import Gerber -from camlib import Geometry, FlatCAMRTreeStorage +from camlib import Geometry, FlatCAMRTreeStorage, grace from AppGUI.GUIElements import FCTable, FCDoubleSpinner, FCCheckBox, FCInputDialog, RadioSet, FCButton, FCComboBox -from Common import GracefulException as grace from shapely.geometry import base, Polygon, MultiPolygon, LinearRing, Point from shapely.ops import cascaded_union, unary_union, linemerge diff --git a/AppTools/ToolPanelize.py b/AppTools/ToolPanelize.py index 7d96a4dd..be41ba5e 100644 --- a/AppTools/ToolPanelize.py +++ b/AppTools/ToolPanelize.py @@ -6,10 +6,11 @@ # ########################################################## from PyQt5 import QtWidgets, QtGui, QtCore -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.GUIElements import FCSpinner, FCDoubleSpinner, RadioSet, FCCheckBox, OptionalInputSection, FCComboBox -from Common import GracefulException as grace +from camlib import grace + from copy import deepcopy import numpy as np diff --git a/AppTools/ToolPcbWizard.py b/AppTools/ToolPcbWizard.py index 29b17898..a9fc6075 100644 --- a/AppTools/ToolPcbWizard.py +++ b/AppTools/ToolPcbWizard.py @@ -7,7 +7,7 @@ from PyQt5 import QtWidgets, QtCore -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.GUIElements import RadioSet, FCSpinner, FCButton, FCTable import re diff --git a/AppTools/ToolProperties.py b/AppTools/ToolProperties.py index d9268fe1..59d73a8c 100644 --- a/AppTools/ToolProperties.py +++ b/AppTools/ToolProperties.py @@ -6,7 +6,7 @@ # ########################################################## from PyQt5 import QtGui, QtCore, QtWidgets -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.GUIElements import FCTree from shapely.geometry import MultiPolygon, Polygon diff --git a/AppTools/ToolPunchGerber.py b/AppTools/ToolPunchGerber.py index 4bb80d39..28d42ef4 100644 --- a/AppTools/ToolPunchGerber.py +++ b/AppTools/ToolPunchGerber.py @@ -7,7 +7,7 @@ from PyQt5 import QtCore, QtWidgets -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, FCComboBox from copy import deepcopy diff --git a/AppTools/ToolQRCode.py b/AppTools/ToolQRCode.py index b2b77db4..1462f205 100644 --- a/AppTools/ToolQRCode.py +++ b/AppTools/ToolQRCode.py @@ -8,7 +8,7 @@ from PyQt5 import QtWidgets, QtCore, QtGui from PyQt5.QtCore import Qt -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.GUIElements import RadioSet, FCTextArea, FCSpinner, FCEntry, FCCheckBox, FCComboBox, FCFileSaveDialog from AppParsers.ParseSVG import * diff --git a/AppTools/ToolRulesCheck.py b/AppTools/ToolRulesCheck.py index a738cf42..0e080892 100644 --- a/AppTools/ToolRulesCheck.py +++ b/AppTools/ToolRulesCheck.py @@ -7,7 +7,7 @@ from PyQt5 import QtWidgets -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.GUIElements import FCDoubleSpinner, FCCheckBox, OptionalInputSection, FCComboBox from copy import deepcopy diff --git a/AppTools/ToolSolderPaste.py b/AppTools/ToolSolderPaste.py index e168f208..d48e7864 100644 --- a/AppTools/ToolSolderPaste.py +++ b/AppTools/ToolSolderPaste.py @@ -5,11 +5,11 @@ # MIT Licence # # ########################################################## -from AppTools.AppTool import AppTool +from AppTool import AppTool from Common import LoudDict from AppGUI.GUIElements import FCComboBox, FCEntry, FCTable, \ FCInputDialog, FCDoubleSpinner, FCSpinner, FCFileSaveDialog -from App import log +from App_Main import log from camlib import distance from AppEditors.FlatCAMTextEditor import TextEditor diff --git a/AppTools/ToolSub.py b/AppTools/ToolSub.py index 85f0e81f..f351064a 100644 --- a/AppTools/ToolSub.py +++ b/AppTools/ToolSub.py @@ -7,7 +7,7 @@ from PyQt5 import QtWidgets, QtCore -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.GUIElements import FCCheckBox, FCButton, FCComboBox from shapely.geometry import Polygon, MultiPolygon, MultiLineString, LineString diff --git a/AppTools/ToolTransform.py b/AppTools/ToolTransform.py index 7167740d..41e6ff91 100644 --- a/AppTools/ToolTransform.py +++ b/AppTools/ToolTransform.py @@ -6,7 +6,7 @@ # ########################################################## from PyQt5 import QtWidgets -from AppTools.AppTool import AppTool +from AppTool import AppTool from AppGUI.GUIElements import FCDoubleSpinner, FCCheckBox, FCButton, OptionalInputSection, FCEntry import gettext diff --git a/App.py b/App_Main.py similarity index 99% rename from App.py rename to App_Main.py index b22aa467..15c73f9f 100644 --- a/App.py +++ b/App_Main.py @@ -43,7 +43,10 @@ import socket # #################################################################################################################### # Diverse -from Common import LoudDict, color_variant, ExclusionAreas +from Common import LoudDict +from Common import color_variant +from Common import ExclusionAreas + from Bookmark import BookmarkManager from AppDatabase import ToolsDB2 diff --git a/CHANGELOG.md b/CHANGELOG.md index d7ff7570..db75a156 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ CHANGELOG for FlatCAM beta - moved some of the methods from the App class to the ObjectCollection class - moved all the new_object related methods in their own class AppObjects.AppObject - more refactoring; solved some issues introduced by the refactoring +- solved a circular import 17.05.2020 diff --git a/Common.py b/Common.py index 85442b80..efdd3252 100644 --- a/Common.py +++ b/Common.py @@ -15,7 +15,7 @@ from PyQt5 import QtCore from shapely.geometry import Polygon, MultiPolygon from AppGUI.VisPyVisuals import ShapeCollection -from AppTools.AppTool import AppTool +from AppTool import AppTool import numpy as np diff --git a/FlatCAM.py b/FlatCAM.py index 1a309537..17b56c29 100644 --- a/FlatCAM.py +++ b/FlatCAM.py @@ -3,7 +3,7 @@ import os from PyQt5 import QtWidgets from PyQt5.QtCore import QSettings, Qt -from App import App +from App_Main import App from AppGUI import VisPyPatches from multiprocessing import freeze_support diff --git a/camlib.py b/camlib.py index e2bebc80..905586dd 100644 --- a/camlib.py +++ b/camlib.py @@ -39,7 +39,6 @@ from shapely.geometry import shape from descartes.patch import PolygonPatch # --------------------------------------- -import collections from collections import Iterable import rasterio @@ -48,7 +47,7 @@ import ezdxf from Common import GracefulException as grace -# TODO: Commented for FlatCAM packaging with cx_freeze +# Commented for FlatCAM packaging with cx_freeze # from scipy.spatial import KDTree, Delaunay # from scipy.spatial import Delaunay diff --git a/tclCommands/TclCommand.py b/tclCommands/TclCommand.py index d89eb0c4..9d0ecc8d 100644 --- a/tclCommands/TclCommand.py +++ b/tclCommands/TclCommand.py @@ -1,6 +1,6 @@ import sys import re -import App +import App_Main import abc import collections from PyQt5 import QtCore @@ -53,7 +53,7 @@ class TclCommand(object): if self.app is None: raise TypeError('Expected app to be FlatCAMApp instance.') - if not isinstance(self.app, App.App): + if not isinstance(self.app, App_Main.App): raise TypeError('Expected FlatCAMApp, got %s.' % type(app)) self.log = self.app.log