flatcam/flatcam

36 lines
1.1 KiB
Plaintext
Raw Normal View History

#!/usr/bin/env python3
############################################################
# FlatCAM: 2D Post-processing for Manufacturing #
# http://flatcam.org #
# Author: Juan Pablo Caram (c) #
# Date: 2/5/2014 #
# MIT Licence #
############################################################
2014-06-13 19:21:11 +00:00
import sys
from PyQt4 import QtGui
from PyQt4 import QtCore
2014-06-13 19:21:11 +00:00
from FlatCAMApp import App
2014-02-06 00:36:47 +00:00
2016-04-10 20:02:38 +00:00
2014-06-13 19:21:11 +00:00
def debug_trace():
2016-04-10 20:02:38 +00:00
"""
Set a tracepoint in the Python debugger that works with Qt
:return: None
"""
2014-09-13 21:29:07 +00:00
from PyQt4.QtCore import pyqtRemoveInputHook
#from pdb import set_trace
pyqtRemoveInputHook()
#set_trace()
2014-06-13 19:21:11 +00:00
debug_trace()
2016-04-10 20:02:38 +00:00
# All X11 calling should be thread safe otherwise we have strange issues
# QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_X11InitThreads)
# NOTE: Never talk to the GUI from threads! This is why I commented the above.
2014-06-13 19:21:11 +00:00
app = QtGui.QApplication(sys.argv)
QtCore.QDir.setSearchPaths("share", str(("share", "share/flatcam", "/usr/share/flatcam")));
2014-06-13 19:21:11 +00:00
fc = App()
2016-04-10 20:02:38 +00:00
sys.exit(app.exec_())