diff --git a/dstatInterface/interface/dstatInterface.glade b/dstatInterface/interface/dstatInterface.glade
index e56f06441f4375fb544e1501b462d4b430e988b0..8c0a51bd271eb613543d980c7b8ea800f3d33338 100644
--- a/dstatInterface/interface/dstatInterface.glade
+++ b/dstatInterface/interface/dstatInterface.glade
@@ -137,13 +137,13 @@
-
diff --git a/dstatInterface/interface/save.py b/dstatInterface/interface/save.py
index 0e83f2f77b831c215b76d5737c7682f5e9dfdea4..4789d408d2ab596dca851e6edbacf560a9c5722a 100644
--- a/dstatInterface/interface/save.py
+++ b/dstatInterface/interface/save.py
@@ -12,7 +12,7 @@ class npSave:
self.filters[0].set_name("NumPy binary (.npy)")
self.filters[0].add_pattern("*.npy")
self.filters.append(gtk.FileFilter())
- self.filters[1].set_name("Whitespace separated text (.txt)")
+ self.filters[1].set_name("Space separated text (.txt)")
self.filters[1].add_pattern("*.txt")
self.fcd.set_do_overwrite_confirmation(True)
@@ -28,10 +28,22 @@ class npSave:
if filter_selection.endswith("(.npy)"):
self.npy()
+ elif filter_selection.endswith("(.txt)"):
+ self.text()
self.fcd.destroy()
def npy(self):
self.data = np.array(self.exp.data)
- np.save(self.path, self.data)
+ np.save(self.path, self.data())
+
+ def text(self):
+ if not self.path.endswith(".txt"):
+ self.path += ".txt"
+
+ self.data = np.array(self.exp.data)
+ header = ""
+ for i in self.exp.commands:
+ header += i
+ np.savetxt(self.path, self.data.transpose(), header=header, newline='\n')
diff --git a/dstatInterface/interface_test.py b/dstatInterface/interface_test.py
index 277b7c4546b764b91bd4975d089289c75e57daff..08d2d817f7675f250d9076ca11e5590166fd2498 100644
--- a/dstatInterface/interface_test.py
+++ b/dstatInterface/interface_test.py
@@ -298,7 +298,7 @@ class main:
self.databuffer.insert_at_cursor("\n")
self.spinner.stop()
- def on_file_save_npy_activate(self, menuitem, data=None):
+ def on_file_save_exp_activate(self, menuitem, data=None):
if self.current_exp:
self.save = save.npSave(self.current_exp)