Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: boB Stepp Newsgroups: comp.lang.python Subject: Re: Simple tkinter query about creating a tk,StringVar() failure Date: Sat, 6 Feb 2016 20:40:16 -0600 Lines: 17 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de 826VGhLq5P7qL2mveojcbAolTxzWjwB4soiug+pXlJ7g== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'received:209.85.223': 0.03; 'win32': 0.03; 'root': 0.04; 'subject:query': 0.07; 'python': 0.10; '2016': 0.16; 'first:': 0.16; 'from:addr:robertvstepp': 0.16; 'from:name:bob stepp': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'script?': 0.16; 'wrote:': 0.16; '>>>': 0.20; 'tkinter': 0.22; 'bit': 0.23; 'seems': 0.23; 'feb': 0.23; 'dec': 0.23; 'sat,': 0.23; 'import': 0.24; 'header:In-Reply-To:1': 0.24; 'message-id:@mail.gmail.com': 0.27; 'skip:( 20': 0.28; 'window': 0.30; 'run': 0.33; 'subject:Simple': 0.33; 'open': 0.33; 'received:google.com': 0.35; 'fail': 0.35; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:209': 0.38; 'why': 0.39; 'does': 0.39; 'to:addr:python.org': 0.40; 'your': 0.60; 'more': 0.63; 'subject:,': 0.82; '3.5.1': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=MI55brmYY3jn2PjHKiBWl86FOG4VYAanoVeFp+IN+R8=; b=lBHqXWDDt5CIvMKqa6TFiGs5HZ5j+52zzMcanuLwsr1ACcQoSxHs3/7/6JTuay7IX1 Zo5lhpZGwCowlPNa+XoIEckQqTcm+bnxACCYLF30z+3wfTj4GU3sWhFf3erWI9pIiHcK 7eY15hMU979T3echkU6SyqWiQuM6QxBNH8VM9Jyum2la8ZGhsOQ8HsLnZYeDHNu72aW7 0LfdZLab+gsFY/tFhfX0DRnAlzWfDpusrbfVgbH504VeBfQ8BJdn7CGqpwfllOgZbBD9 12GhfNeNdLpxMFy5qLPqEUrrLpZ3K24m5VPkYnWkDy2oZo0E4n8DfNucgQAiIRl3gnL5 fEUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=MI55brmYY3jn2PjHKiBWl86FOG4VYAanoVeFp+IN+R8=; b=HXxJUKFiR4txK/Hp/4TD+Hy0Qt6hRtXUW2GoK1GK0bhSnvgijhrdREKzAMnssIERPd d6N/jWopqE7grO5SOpKbkqzU6Ej71WQlc/sst5hL/oMahVej1l5NbeSgazcrL7n/nOeB jtEjX3bthJcR1xnZg4JBs/XB2H737Rgzmk6+qJSyZPAiEpiCn4qULXs0MVCL/nRFe+qT qhFSo9d6H/B/K7/DPP6xZrXFG5Da4euqctDLyyAO7HxEhZ8LIYEowPYziO4plqz1P/7q cdIR1ism+M19+54EkTQ6dCzE/+LG8LheNnzWPWq1giTdlLJBxOgs8KvyV5cSU8i/MbxO xpFw== X-Gm-Message-State: AG10YOSWAtUf2CPwCAiDEndtsZivp7Zs3eBfI/iSNbaZWYK2jJqorLEPyQCXkZywE42pdqyQVXKnEahpcSwSyw== X-Received: by 10.107.129.89 with SMTP id c86mr23089829iod.102.1454812816576; Sat, 06 Feb 2016 18:40:16 -0800 (PST) In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21rc2 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:102602 On Sat, Feb 6, 2016 at 6:38 PM, wrote: > Why does this interactive instantiation fail when it seems to work > when run in a script? You have to establish your root window first: Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import tkinter as tk >>> root = tk.Tk() # This will open an empty window. >>> name = tk.StringVar() >>> -- boB