Oct-14-2020, 12:04 AM
I have a little problem, if I set the global variable sys_note the results into sys_notes Label are printed in tuple format (3,). I want to have a plane number without brackets, however, when I use the function I'm getting an error: <function notes_counter at 0x0000024E06FC51F0>
I'm a beginner with Python
# Global Variable
sys_note = cur.execute("SELECT count(*) FROM notes").fetchone()
# With fucntion
def notes_counter():
sys_note = cur.execute("SELECT count(*) FROM notes").fetchone()
# Label Statistic - System Notes
self.sys_notes = Label(self.footer, text = ' | Notes: ' + str(notes_counter), fg = '#b3b3b3', bg = '#333', font = 'Helvetica 10 bold')
self.sys_notes.grid(row = 0, column = 3)
I'm a beginner with Python

# Global Variable
sys_note = cur.execute("SELECT count(*) FROM notes").fetchone()
# With fucntion
def notes_counter():
sys_note = cur.execute("SELECT count(*) FROM notes").fetchone()
# Label Statistic - System Notes
self.sys_notes = Label(self.footer, text = ' | Notes: ' + str(notes_counter), fg = '#b3b3b3', bg = '#333', font = 'Helvetica 10 bold')
self.sys_notes.grid(row = 0, column = 3)