11import sys ,os
2- import parameters ,helpAbout ,autoUpdate
3- from Combobox import ComboBox
2+ try :
3+ import parameters ,helpAbout ,autoUpdate
4+ from Combobox import ComboBox
5+ except ImportError :
6+ from COMTool import parameters ,helpAbout ,autoUpdate
7+ from COMTool .Combobox import ComboBox
8+
49# from COMTool.wave import Wave
510from PyQt5 .QtCore import pyqtSignal ,Qt
611from PyQt5 .QtWidgets import (QApplication , QWidget ,QToolTip ,QPushButton ,QMessageBox ,QDesktopWidget ,QMainWindow ,
@@ -270,6 +275,7 @@ def initWindow(self):
270275 if sys .platform == "win32" :
271276 ctypes .windll .shell32 .SetCurrentProcessExplicitAppUserModelID ("comtool" )
272277 self .show ()
278+ print ("config file path:" ,os .getcwd ()+ "comtool.settings.config" )
273279 return
274280
275281 def initEvent (self ):
@@ -640,7 +646,7 @@ def programExitSaveParameters(self):
640646 else :
641647 paramObj .dtr = 0
642648 paramObj .encodingIndex = self .encodingCombobox .currentIndex ()
643- f = open ("settings.config" ,"wb" )
649+ f = open ("comtool. settings.config" ,"wb" )
644650 f .truncate ()
645651 pickle .dump (paramObj , f )
646652 pickle .dump (paramObj .sendHistoryList ,f )
@@ -650,12 +656,12 @@ def programExitSaveParameters(self):
650656 def programStartGetSavedParameters (self ):
651657 paramObj = parameters .ParametersToSave ()
652658 try :
653- f = open ("settings.config" , "rb" )
659+ f = open ("comtool. settings.config" , "rb" )
654660 paramObj = pickle .load ( f )
655661 paramObj .sendHistoryList = pickle .load (f )
656662 f .close ()
657663 except Exception as e :
658- f = open ("settings.config" , "wb" )
664+ f = open ("comtool. settings.config" , "wb" )
659665 f .close ()
660666 self .serailBaudrateCombobox .setCurrentIndex (paramObj .baudRate )
661667 self .serailBytesCombobox .setCurrentIndex (paramObj .dataBytes )
0 commit comments