Need guidance on how to use Tkiner in visual studio. The tkiner program doesn't run, it shows as a syntax error. Code: from tkinter import* import tkinter.messagebox class Library:     def __init_(self,root):         self.root = root         self.root.title("Library Inventory System")         self.root.geometry("1350x750+0+0")                 BookId = StringVar()         AuthorFullName=StringVar()         PublicationYear=StringVar()         BookTitle=StringVar()         num_copies=StringVar()             #===================Frames==========================#         MainFrame = Frame(self.root)         MainFrame.grid()                 TitleFrame = Frame(MainFrame, bd=2, padx=40, pady=8, bg="Cadet blue", relief=RIDGE)         TitleFrame.pack(side=TOP)                 self.libTitle =Label(TitleFrame, font=('arial',46,'bold'),text="Library Inventory System")         self.libTitle.grid(sticky=W)                 ButtonFrame =Frame(MainFrame,bd=2,width=1350,height=100,padx=20,pady=20,bg="Cadet Blue",relief=RIDGE)         ButtonFrame.pack(side=BOTTOM)                     FrameDetail = Frame(MainFrame,bd=0,width=1350,height=50,padx=20,relief=RIDGE )         FrameDetail.pack(side=BOTTOM)                     DataFrame = Frame(MainFrame,bd=0,width=1350,height=400,padx=20,pady=20,relief=RIDGE )         DataFrame.pack(side=BOTTOM)                     DataFrameLEFT = LabelFrame(DataFrame,bd=1,width=800,height=300,padx=20,relief=RIDGE                                     , font=('arial', 12,'bold'),text="Library Membership Info:",bg="Cadet Blue")         DataFrameLEFT.pack(side=LEFT)                     DataFrameRIGHT = LabelFrame(DataFrame,bd=1,width=450,height=300,padx=20,pady=3,relief=RIDGE                                     , font=('arial', 12,'bold'),bg="Cadet Blue",text="Book Detail:",)         DataFrameRIGHT.pack(side=RIGHT)         #===================Labels and Entries==========================#       if __name__=='__main__':      root =Tk()      application = Library(root)      root.mainloop() Error screenshot in the image.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Need guidance on how to use Tkiner in visual studio.

The tkiner program doesn't run, it shows as a syntax error.

Code:

from tkinter import*
import tkinter.messagebox

class Library:
    def __init_(self,root):
        self.root = root
        self.root.title("Library Inventory System")
        self.root.geometry("1350x750+0+0")
       
        BookId = StringVar()
        AuthorFullName=StringVar()
        PublicationYear=StringVar()
        BookTitle=StringVar()
        num_copies=StringVar()
       
    #===================Frames==========================#
        MainFrame = Frame(self.root)
        MainFrame.grid()
       
        TitleFrame = Frame(MainFrame, bd=2, padx=40, pady=8, bg="Cadet blue", relief=RIDGE)
        TitleFrame.pack(side=TOP)
       
        self.libTitle =Label(TitleFrame, font=('arial',46,'bold'),text="Library Inventory System")
        self.libTitle.grid(sticky=W)
       
        ButtonFrame =Frame(MainFrame,bd=2,width=1350,height=100,padx=20,pady=20,bg="Cadet Blue",relief=RIDGE)
        ButtonFrame.pack(side=BOTTOM)
           
        FrameDetail = Frame(MainFrame,bd=0,width=1350,height=50,padx=20,relief=RIDGE )
        FrameDetail.pack(side=BOTTOM)
           
        DataFrame = Frame(MainFrame,bd=0,width=1350,height=400,padx=20,pady=20,relief=RIDGE )
        DataFrame.pack(side=BOTTOM)
           
        DataFrameLEFT = LabelFrame(DataFrame,bd=1,width=800,height=300,padx=20,relief=RIDGE
                                    , font=('arial', 12,'bold'),text="Library Membership Info:",bg="Cadet Blue")
        DataFrameLEFT.pack(side=LEFT)
           
        DataFrameRIGHT = LabelFrame(DataFrame,bd=1,width=450,height=300,padx=20,pady=3,relief=RIDGE
                                    , font=('arial', 12,'bold'),bg="Cadet Blue",text="Book Detail:",)
        DataFrameRIGHT.pack(side=RIGHT)
        #===================Labels and Entries==========================#      
if __name__=='__main__':
     root =Tk()
     application = Library(root)
     root.mainloop()
Error screenshot in the image.
 
Los
40
A
File
Edit Selection View Go
EXPLORER
✓ TKINER PROJECT
✓ Include
> Lib
✓
Scripts
> _pycache_
activate
activate.bat
> Activate.ps1
deactivate.bat
ipython.exe
ipython3.exe
= jupyter-kernel.exe
= jupyter-kernelspec.exe
jupyter-migrate.exe
= jupyter-run.exe
= jupyter-troubleshoot.exe
Ejupyter.exe
Epip.exe
= pip3.10.exe
Epip3.exe
= pygmentize.exe
= python.exe
= pythonw.exe
pywin32_postinstall.py
pywin32_testall.py
> share
✰ pyvenv.cfg
→ Lib_DB.py
Library Database.py
> TIMELINE
Run Terminal Help
→ Library Database.py X
Library Database.py > ...
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
PROBLEMS OUTPUT DEBUG CONSOLE
>>> & "C:/Users
File "<stdin>", line 1
& "c:/Users
SyntaxError: invalid syntax
if
MainFrame.grid()
TERMINAL
TitleFrame = Frame (MainFrame, bd=2, padx=40, pady=8, bg="Cadet blue", relief=RIDGE)
TitleFrame.pack (side=TOP)
self.libTitle =Label(Title Frame, font=('arial', 46, 'bold'),text="Library Inventory System")
self.libTitle.grid (sticky=W)
ButtonFrame =Frame (MainFrame, bd=2,width=1350,height=100, padx=20, pady=20, bg="Cadet Blue", relief=RIDGE)
ButtonFrame.pack(side=BOTTOM)
FrameDetail = Frame (MainFrame, bd=0,width=1350,height=50, padx=20,relief=RIDGE)
FrameDetail.pack(side=BOTTOM)
Library Database.py - Tkiner Project - Visual Studio Code
DataFrame = Frame (Main Frame, bd=0,width=1350,height=400, padx=20, pady=20,relief=RIDGE)
DataFrame.pack(side=BOTTOM)
DataFrameLEFT = LabelFrame (DataFrame, bd=1,width=800,height=300, padx=20,relief=RIDGE
DataFrameLEFT.pack(side=LEFT)
DataFrameRIGHT = LabelFrame (DataFrame, bd=1,width=450,height=300, padx=20, pady=3, relief=RIDGE
font-('arial', 12, 'bold'), bg="Cadet Blue", text="Book Detail:",)
DataFrameRIGHT.pack(side-RIGHT)
#=======
_main__':
name
root =Tk()
application = Library (root)
root.mainloop()
,
ر
font-('arial', 12, 'bold'), text="Library Membership Info:", bg="Cadet Blue")
====Labels and Entries======
=======#
Desktop/Tkiner Project/studysession/Scripts/python.exe" "c:/Users/sosna/Desktop/Tkiner Project/Library_Database.py"
Project/studysession/Scripts/python.exe" "c:/Users/sosna/Desktop/Tkiner Project/Library_Database.py"
Desktop/Tkiner
Python + ✓
D
8
1
8
x
>
|>
>
Transcribed Image Text:Los 40 A File Edit Selection View Go EXPLORER ✓ TKINER PROJECT ✓ Include > Lib ✓ Scripts > _pycache_ activate activate.bat > Activate.ps1 deactivate.bat ipython.exe ipython3.exe = jupyter-kernel.exe = jupyter-kernelspec.exe jupyter-migrate.exe = jupyter-run.exe = jupyter-troubleshoot.exe Ejupyter.exe Epip.exe = pip3.10.exe Epip3.exe = pygmentize.exe = python.exe = pythonw.exe pywin32_postinstall.py pywin32_testall.py > share ✰ pyvenv.cfg → Lib_DB.py Library Database.py > TIMELINE Run Terminal Help → Library Database.py X Library Database.py > ... 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 PROBLEMS OUTPUT DEBUG CONSOLE >>> & "C:/Users File "<stdin>", line 1 & "c:/Users SyntaxError: invalid syntax if MainFrame.grid() TERMINAL TitleFrame = Frame (MainFrame, bd=2, padx=40, pady=8, bg="Cadet blue", relief=RIDGE) TitleFrame.pack (side=TOP) self.libTitle =Label(Title Frame, font=('arial', 46, 'bold'),text="Library Inventory System") self.libTitle.grid (sticky=W) ButtonFrame =Frame (MainFrame, bd=2,width=1350,height=100, padx=20, pady=20, bg="Cadet Blue", relief=RIDGE) ButtonFrame.pack(side=BOTTOM) FrameDetail = Frame (MainFrame, bd=0,width=1350,height=50, padx=20,relief=RIDGE) FrameDetail.pack(side=BOTTOM) Library Database.py - Tkiner Project - Visual Studio Code DataFrame = Frame (Main Frame, bd=0,width=1350,height=400, padx=20, pady=20,relief=RIDGE) DataFrame.pack(side=BOTTOM) DataFrameLEFT = LabelFrame (DataFrame, bd=1,width=800,height=300, padx=20,relief=RIDGE DataFrameLEFT.pack(side=LEFT) DataFrameRIGHT = LabelFrame (DataFrame, bd=1,width=450,height=300, padx=20, pady=3, relief=RIDGE font-('arial', 12, 'bold'), bg="Cadet Blue", text="Book Detail:",) DataFrameRIGHT.pack(side-RIGHT) #======= _main__': name root =Tk() application = Library (root) root.mainloop() , ر font-('arial', 12, 'bold'), text="Library Membership Info:", bg="Cadet Blue") ====Labels and Entries====== =======# Desktop/Tkiner Project/studysession/Scripts/python.exe" "c:/Users/sosna/Desktop/Tkiner Project/Library_Database.py" Project/studysession/Scripts/python.exe" "c:/Users/sosna/Desktop/Tkiner Project/Library_Database.py" Desktop/Tkiner Python + ✓ D 8 1 8 x > |> >
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Study of Characters
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education