Просмотр исходного кода

Fix run a program in unix-based systems

camellan 6 лет назад
Родитель
Сommit
34c2d26422
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      FlatCAMApp.py

+ 3 - 1
FlatCAMApp.py

@@ -19,7 +19,6 @@ import shutil
 from stat import S_IREAD, S_IRGRP, S_IROTH
 from stat import S_IREAD, S_IRGRP, S_IROTH
 import subprocess
 import subprocess
 import ctypes
 import ctypes
-import winreg
 
 
 import tkinter as tk
 import tkinter as tk
 from PyQt5 import QtPrintSupport
 from PyQt5 import QtPrintSupport
@@ -62,6 +61,9 @@ import gettext
 import FlatCAMTranslation as fcTranslate
 import FlatCAMTranslation as fcTranslate
 import builtins
 import builtins
 
 
+if sys.platform == 'win32':
+    import winreg
+
 fcTranslate.apply_language('strings')
 fcTranslate.apply_language('strings')
 if '_' not in builtins.__dict__:
 if '_' not in builtins.__dict__:
     _ = gettext.gettext
     _ = gettext.gettext