fixes, DAMARIS3 runs now on Debian 13 trixie
This commit is contained in:
@@ -98,7 +98,7 @@ setup (
|
||||
author = 'Achim Gaedke',
|
||||
author_email = 'Achim.Gaedke@physik.tu-darmstadt.de',
|
||||
maintainer = 'Achim Gaedke',
|
||||
maintainer_email = 'Achim.Gaedke@physik.tu-darmstadt.de',
|
||||
maintainer_email = 'markus.rosenstihl@pkm.tu-darmstadt.de',
|
||||
url = 'http://www.fkp.physik.tu-darmstadt.de/damaris/',
|
||||
license = GPL_LICENCE,
|
||||
platforms = ['Any',],
|
||||
|
||||
@@ -8,11 +8,18 @@ import collections
|
||||
import threading
|
||||
import traceback
|
||||
import io
|
||||
if sys.version_info.major == 3 and sys.version_info.minor >= 10:
|
||||
|
||||
from collections.abc import MutableMapping
|
||||
else:
|
||||
from collections import MutableMapping
|
||||
|
||||
|
||||
from . import ADC_Result
|
||||
from . import Accumulation
|
||||
from . import MeasurementResult
|
||||
|
||||
class DataPool(collections.MutableMapping):
|
||||
class DataPool(MutableMapping):
|
||||
"""
|
||||
dictionary with sending change events
|
||||
"""
|
||||
|
||||
+13
-9
@@ -24,8 +24,9 @@ gi.require_version('GtkSource', '3.0')
|
||||
# gui graphics
|
||||
from gi.repository import GObject as gobject
|
||||
import sqlite3,uuid
|
||||
from pkg_resources import parse_version
|
||||
|
||||
gobject.threads_init( )
|
||||
#gobject.threads_init( )
|
||||
from gi.repository import Gtk as gtk
|
||||
|
||||
gtk_version_missmatch = gtk.check_version( 3, 0, 0 )
|
||||
@@ -34,7 +35,7 @@ if gtk_version_missmatch:
|
||||
|
||||
from gi.repository import Gdk as gdk
|
||||
|
||||
gdk.threads_init( )
|
||||
#gdk.threads_init( )
|
||||
|
||||
#import gtk.glade
|
||||
|
||||
@@ -65,7 +66,7 @@ import matplotlib.figure
|
||||
#for printing issues
|
||||
if hasattr( gtk, "PrintOperation" ):
|
||||
import matplotlib.backends.backend_cairo
|
||||
|
||||
print('backend:', matplotlib.get_backend()) # must print GTK3Agg
|
||||
# import our own stuff
|
||||
from damaris.gui import ExperimentWriter, ExperimentHandling
|
||||
from damaris.gui import ResultReader, ResultHandling
|
||||
@@ -178,7 +179,7 @@ class DamarisGUI:
|
||||
# my notebook
|
||||
self.main_notebook = self.xml_gui.get_object( "main_notebook" )
|
||||
|
||||
self.log = LogWindow( self.xml_gui , self)
|
||||
self.log = LogWindow( self.xml_gui, self )
|
||||
|
||||
self.sw = ScriptWidgets( self.xml_gui )
|
||||
|
||||
@@ -192,7 +193,7 @@ class DamarisGUI:
|
||||
# lock file to prevent other DAMARIS to start immediatly
|
||||
self.lockfile = LockFile() # = os.path.expanduser("~/.damaris.lock")
|
||||
self.id = None
|
||||
|
||||
|
||||
#to stop queued experiments
|
||||
self.stop_experiment_flag = threading.Event()
|
||||
|
||||
@@ -1148,7 +1149,8 @@ class LogWindow:
|
||||
self.textview.connect( "key-press-event", self.textview_keypress)
|
||||
self.textbuffer = self.textview.get_buffer( )
|
||||
self.logstream = log
|
||||
self.logstream.gui_log = self
|
||||
print("here i am")
|
||||
#self.logstream.gui_log = self
|
||||
self.last_timetag = None
|
||||
self( "Started in directory %s\n" % os.getcwd( ) )
|
||||
|
||||
@@ -2474,9 +2476,11 @@ class MonitorWidgets:
|
||||
self.display_table.attach( self.matplot_canvas, 0, 6, 0, 1, gtk.AttachOptions.EXPAND | gtk.AttachOptions.FILL, gtk.AttachOptions.EXPAND | gtk.AttachOptions.FILL, 0, 0 )
|
||||
self.matplot_canvas.show( )
|
||||
|
||||
# Matplot Toolbar hinzufuegen (Display_Table, 2. Zeile)
|
||||
self.matplot_toolbar = matplotlib.backends.backend_gtk3.NavigationToolbar2GTK3( self.matplot_canvas,
|
||||
self.main_window )
|
||||
# Matplot Toolbar hinzufuegen (Display_Table, 2. Zeile)
|
||||
if parse_version(matplotlib.__version__) >= parse_version("3.6"):
|
||||
self.matplot_toolbar = matplotlib.backends.backend_gtk3.NavigationToolbar2GTK3( self.matplot_canvas )
|
||||
else: #
|
||||
self.matplot_toolbar = matplotlib.backends.backend_gtk3.NavigationToolbar2GTK3( self.matplot_canvas, self.main_window )
|
||||
|
||||
self.display_table.attach( self.matplot_toolbar, 0, 1, 1, 2, gtk.AttachOptions.FILL | gtk.AttachOptions.EXPAND, 0, 0, 0 )
|
||||
self.matplot_toolbar.show( )
|
||||
|
||||
@@ -56,7 +56,7 @@ class goniometer:
|
||||
|
||||
def _recv(self):
|
||||
retstr = self.serial.readline().strip().replace("\x00","")
|
||||
search_result = re.search("<(\d+)>", retstr)
|
||||
search_result = re.search(r"<(\d+)>", retstr)
|
||||
if search_result != None:
|
||||
angle = float(search_result.group(1))/36.0
|
||||
self.current_angle = angle
|
||||
|
||||
Reference in New Issue
Block a user