wolfhece 2.1.116__py3-none-any.whl → 2.1.118__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
wolfhece/PyParams.py CHANGED
@@ -485,6 +485,21 @@ class Wolf_Param(wx.Frame):
485
485
  """ Return the number of incrementable groups """
486
486
  return len(self.myIncGroup.keys())
487
487
 
488
+ def get_group_keys(self) -> list[str]:
489
+ """ Return the keys of the active parameters """
490
+ return list(self.myparams.keys())
491
+
492
+ def get_default_group_keys(self) -> list[str]:
493
+ """ Return the keys of the default parameters """
494
+ return list(self.myparams_default.keys())
495
+
496
+ def get_param_keys(self, group:str) -> list[str]:
497
+ """ Return the keys of the active parameters """
498
+ if group in self.myparams.keys():
499
+ return list(self.myparams[group].keys())
500
+ else:
501
+ return []
502
+
488
503
  @property
489
504
  def callback(self):
490
505
  """ Return the callback function """
@@ -738,6 +753,18 @@ class Wolf_Param(wx.Frame):
738
753
  def SavetoFile(self, event:wx.MouseEvent):
739
754
  """ sauvegarde dans le fichier texte """
740
755
 
756
+ self.save()
757
+
758
+ def Save(self, filename:str = ''):
759
+ """ Save the parameters in a file """
760
+
761
+ if filename != '':
762
+ self.filename = filename
763
+
764
+ if self.filename=='':
765
+ logging.warning(_('No filename given'))
766
+ return
767
+
741
768
  with open(self.filename, 'w') as myfile:
742
769
 
743
770
  for group in self.myparams.keys():
@@ -745,8 +772,6 @@ class Wolf_Param(wx.Frame):
745
772
  for param_name in self.myparams[group].keys():
746
773
  myfile.write(param_name +'\t' + str(self.myparams[group][param_name][key_Param.VALUE])+'\n')
747
774
 
748
- myfile.close()
749
-
750
775
  def Reload(self, event:wx.MouseEvent):
751
776
  """ relecture du fichier sur base du nom déjà connu """
752
777
  if self.filename=='':
wolfhece/apps/version.py CHANGED
@@ -5,7 +5,7 @@ class WolfVersion():
5
5
 
6
6
  self.major = 2
7
7
  self.minor = 1
8
- self.patch = 116
8
+ self.patch = 118
9
9
 
10
10
  def __str__(self):
11
11