I want to access the entry widget via the get() method, not the variable. The problem is I can´t seem to make the entry as variable accessible in other methods. The widget I am talking about is the trennzeichenentry widget from my menubaroptions method.
Here is a snippet of my code:
import tkinter
from tkinter.constants import *
from tkinter import messagebox
from struct import unpack
from codecs import decode
class Graphicaluserinterface(tkinter.Frame):
    @classmethod
    def main(cls):
        root = tkinter.Tk()
        root.title('Hex2Dec_Converter_APS300')
        root.minsize(560, 105)
        gui = cls(root)
        gui.grid(row=0, column=0, sticky=NSEW)
        root.grid_rowconfigure(0, weight=1)
        root.grid_columnconfigure(0, weight=1)
        root['menu'] = gui.menubar
        root.mainloop()
    def __init__(self, master=None):
        super().__init__(master)
        for rowconfigure in range(5):
            self.master.grid_rowconfigure(rowconfigure,weight=1)
        for columnconfigure in range(4):
            self.master.grid_columnconfigure(columnconfigure,weight=1)
        frame1 = tkinter.Frame(master)
        frame1.grid(row=0,column=0,rowspan=5,columnspan=1,sticky=NSEW)
        frame1.columnconfigure(0,weight=1)
        frame2 = tkinter.Frame(master)
        frame2.grid(row=0,column=1,rowspan=5,columnspan=3,sticky=NSEW)
        frame2.columnconfigure(1,weight=2)
        frame2.rowconfigure(0,weight=0)
        frame2.rowconfigure(1,weight=6)
        frame2.rowconfigure(2,weight=0)
        frame2.rowconfigure(3,weight=1)
        frame2.rowconfigure(4,weight=2)
        self.entrystring = tkinter.IntVar()
        self.taktzykluszeit = tkinter.DoubleVar()
        self.menubar = tkinter.Menu(self)
        self.file_menu = tkinter.Menu(self.menubar, tearoff=FALSE)
        self.help_menu = tkinter.Menu(self.menubar, tearoff=FALSE)
        self.create_widgets()
    def create_widgets(self):
        self.menubar.add_cascade(label="File", menu=self.file_menu)
       self.file_menu.add_command(label="Options",command=self.menubaroptions)
    def menubaroptions(root):
        optionswindow = tkinter.Toplevel(root)
        optionswindow.title("Options")
        optionswindow.minsize(300,150)
        trennzeichenlabel = tkinter.Label(optionswindow,text="Length of Separator in Byte:")
        trennzeichenlabel.pack()
        trennzeichenentry = tkinter.Entry(optionswindow,textvariable=root.entrystring,width=30,justify="center")
        trennzeichenentry.pack()
        taktzykluszeitlabel = tkinter.Label(optionswindow,text="Measurementtime for all \n Temperature-Sensors in sec")
        taktzykluszeitlabel.pack()
        taktzykluszeitentry = tkinter.Entry(optionswindow,textvariable=root.taktzykluszeit,width=30,justify="center")
        taktzykluszeitentry.pack()
    def methodiwanttocallthevariablein(self):
        #call trennzeichenentry here
if __name__ == '__main__':
    Graphicaluserinterface.main()
So how can I make "trennzeichenentry" into a variable and call it in the method "methodiwanttocallthevariablein" ?
I always got NameError when trying around myself. I am not quite sure what is different here than to my other methods  and variable I have.
 
    