Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6051013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:45:17+00:00 2026-05-23T07:45:17+00:00

from Tkinter import * class Application (Frame): def __init__(self, master): Frame.__init__(self, master) self.grid() self.create_widgets()

  • 0
from Tkinter import *

class Application (Frame):
    def __init__(self, master):
        Frame.__init__(self, master)
        self.grid()
        self.create_widgets()

    def create_widgets(self):


        Label(self, text = "Select the last book you read.").grid (row = 0, column = 0, sticky = W)

        self.choice = StringVar() 

        Radiobutton (self,text = "Nausea by Jean-Paul Sartre",variable = self.choice,
                 value = "Wake up. This is a dream. This is all only a test of the emergency broadcasting system.",
                 command = self.update_text).grid (row = 2, column = 1, sticky = W)

        Radiobutton (self,
                 text = "Infinite Jest by David Foster Wallace",
                 variable = self.choice,
                 value = "Because an adult borne without the volition to choose the thoughts that he thinks, is going to get hosed ;)",
                 command = self.update_text).grid (row = 3, column = 1, sticky = W)

        Radiobutton (self,
                 text = "Cat's Cradle by Kurt Vonnegut",
                 variable = self.choice,
                 value = " \"Here we are, trapped in the amber of the moment. There is no why!\" ",
                 command = self.update_text.grid (row = 4, column = 1, sticky = W)

        self.txt_display = Text (self, width = 40, height = 5, wrap = WORD)
        self.txt_display.grid (row = 6, column = 0, sticky = W)


    #There is only one choice value - self.choice. That can be "printed."

    def update_text(self):
        message = self.choice.get()
        self.txt_display.delete (0.0, END)
        self.txt_display.insert (0.0, message)

# The Main
root = Tk()
root.title ("The Book Critic One")
root.geometry ("400x400")

app = Application (root)
root.mainloop()

I keep getting a Syntax Error in the self.text_display_delete line which I can’t seem to lose.

Any input would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:45:17+00:00Added an answer on May 23, 2026 at 7:45 am

    Take a look at the previous line – I only count one closing parenthesis, while you should have two:

     Radiobutton (self,
                     text = "Cat's Cradle by Kurt Vonnegut",
                     variable = self.choice,
                     value = " \"Here we are, trapped in the amber of the moment. There is no why!\" ",
                     command = self.update_text.grid (row = 4, column = 1, sticky = W)) #<-- Missing that second paren
    

    Usually if one line looks clean, the syntax error is on the previous line(s), and 99% of the time it’s a missing paren.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

from TKinter import * class Ui(Frame): def __init__(self) Frame.__init__(self, None) self.grid() bquit=Button(self, text=Quit, command=self.quit_pressed)
from Tkinter import * window = Tk() frame=Frame(window) frame.pack() text_area = Text(frame) text_area.pack() text1
from Tkinter import * import Tkinter as tk import tkMessageBox import time import re
so i have the code : from Tkinter import * from urllib2 import *
from urllib import urlopen import re p = re.compile('<h2><a .*?><a .*? href=(.*?)>(.*?)</a>') text =
so when i run this code and click the button: from Tkinter import *
How do you invoke a tkinter event from a separate object? I'm looking for
From a desktop application developer point of view, is there any difference between developing
I am making a small application with Tkinter. I would like to clean few
One question : How do you dynamically draw to a Tkinter Canvas object from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.