Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #102602 > unrolled thread

Re: Simple tkinter query about creating a tk,StringVar() failure

Started byboB Stepp <robertvstepp@gmail.com>
First post2016-02-06 20:40 -0600
Last post2016-02-06 20:40 -0600
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Simple tkinter query about creating a tk,StringVar() failure boB Stepp <robertvstepp@gmail.com> - 2016-02-06 20:40 -0600

#102602 — Re: Simple tkinter query about creating a tk,StringVar() failure

FromboB Stepp <robertvstepp@gmail.com>
Date2016-02-06 20:40 -0600
SubjectRe: Simple tkinter query about creating a tk,StringVar() failure
Message-ID<mailman.55.1454812824.2317.python-list@python.org>
On Sat, Feb 6, 2016 at 6:38 PM,  <paul.hermeneutic@gmail.com> 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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web