FlatCAM.py 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. ############################################################
  2. # FlatCAM: 2D Post-processing for Manufacturing #
  3. # http://flatcam.org #
  4. # Author: Juan Pablo Caram (c) #
  5. # Date: 2/5/2014 #
  6. # MIT Licence #
  7. ############################################################
  8. import sys
  9. from PyQt4 import QtGui
  10. from FlatCAMApp import App
  11. def debug_trace():
  12. """
  13. Set a tracepoint in the Python debugger that works with Qt
  14. :return: None
  15. """
  16. from PyQt4.QtCore import pyqtRemoveInputHook
  17. #from pdb import set_trace
  18. pyqtRemoveInputHook()
  19. #set_trace()
  20. debug_trace()
  21. # All X11 calling should be thread safe otherwise we have strange issues
  22. # QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_X11InitThreads)
  23. # NOTE: Never talk to the GUI from threads! This is why I commented the above.
  24. app = QtGui.QApplication(sys.argv)
  25. fc = App()
  26. sys.exit(app.exec_())