flatcam 1.1 KB

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