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


Groups > comp.lang.python > #102600

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

Path csiph.com!feeder.erje.net!2.eu.feeder.erje.net!newsfeed.freenet.ag!87.79.20.101.MISMATCH!newsreader4.netcologne.de!news.netcologne.de!fu-berlin.de!uni-berlin.de!not-for-mail
From paul.hermeneutic@gmail.com
Newsgroups comp.lang.python
Subject Simple tkinter query about creating a tk,StringVar() failure
Date Sat, 6 Feb 2016 17:38:14 -0700
Lines 21
Message-ID <mailman.53.1454805521.2317.python-list@python.org> (permalink)
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de NWyytWjU8rYW0DqBT4Ul5g99RGRegsh6/eZPd4ER59jQ==
Return-Path <paul.hermeneutic@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'value,': 0.03; 'win32': 0.03; 'yet.': 0.03; 'subject:query': 0.07; '__init__': 0.09; 'name)': 0.09; 'python': 0.10; 'received:io': 0.16; 'received:psf.io': 0.16; 'script?': 0.16; 'attribute': 0.18; '>>>': 0.20; '"",': 0.22; 'tkinter': 0.22; 'bit': 0.23; 'seems': 0.23; 'dec': 0.23; 'tried': 0.24; 'import': 0.24; '(most': 0.24; 'message-id:@mail.gmail.com': 0.27; 'skip:f 40': 0.27; 'skip:( 20': 0.28; 'run': 0.33; 'subject:Simple': 0.33; 'traceback': 0.33; 'file': 0.34; 'received:google.com': 0.35; 'fail': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'list.': 0.37; 'skip:v 20': 0.38; 'received:209': 0.38; 'why': 0.39; 'does': 0.39; 'to:addr:python.org': 0.40; 'from:no real name:2**0': 0.60; 'more': 0.63; 'tutor': 0.66; 'suited': 0.72; '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:from:date:message-id:subject:to:content-type; bh=ojpIy15HxTGSGOxwuXBMf1lvi1aEoB3qPhGeCS3y0T8=; b=wFZC7c1i7ct/RjE6/8c6ULv5JsRlwvY9eK5a4gXaGzmpQbGE7SM4XvtVvwTdeztSlU 1yGHpYVfEL4Wp6mSVERIclBuoIVnvEsKavUElHyRxRXaurbqAbE884o83W9iH6Oyl2dj uuSGAkREVQUF11gMkjYYeozZN/Z7sSXoJA43wUGVaFlGA6xrvVzTrzpd4ty508dnJAOB MTbblbLJtbFeIgg8KgdJIQ/LAz4hWBYnXKSPZB5Uc7BwixKKdusuelVvi7Uzp1ysPmgE zka+Trqtt9j/ljCF54i43llNWAIPJr3dmL8AGHOkGGxdEVJxZMIjPlJsr90kCjpGSp70 jCHw==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=ojpIy15HxTGSGOxwuXBMf1lvi1aEoB3qPhGeCS3y0T8=; b=OwPWo+Aq/B/fFSsoEj8frBRG9w2fi6b8W38IRzde2gu6CL0cAhWY8FWHPdd34dbCto 6L/0KkDQA18dw01J7Iby5NmIDmyecTJs4DJ8Z41KmbH0BU/GIt0r70/w3Y9ADvMu/jXp 0pHtOFcdmUrE0YGtNvUona8MBLC2BPkUGywLQvsyvaPD5vcaIBPBzFHgTqFHIR9tCHz9 /LuVkeufxi/id+FJrLMmTLY2PWD87DidcI0/RFkJ9o/IaLhSWHreEGa/iFB5xyHg6ey5 2nFzNY9QNRQCqsaOJ5nOMho1WP+odRz5HM+Ni7l5rnIuhtAAuNjeIKsz2N0n4ssw6PUn Q10g==
X-Gm-Message-State AG10YOQGzaSo6jXk0nWm7OgopL1AuEhQ1vbxetQ8FfOtym/kt5Si5BHLYUG+JR+pV5UG8ez84J/AjDb+KI08DQ==
X-Received by 10.112.73.69 with SMTP id j5mr7324731lbv.124.1454805513558; Sat, 06 Feb 2016 16:38:33 -0800 (PST)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21rc2
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:102600

Show key headers only | View raw


I know this may be more suited to the tutor list. I tried to
subscribe, but no response yet.

Why does this interactive instantiation fail when it seems to work
when run in a script?

(py35-64) C:\src\pygui>python
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
>>> name = tk.StringVar()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\Python35\lib\tkinter\__init__.py", line 329,
in __init__
    Variable.__init__(self, master, value, name)
  File "C:\Program Files\Python35\lib\tkinter\__init__.py", line 233,
in __init__
    self._root = master._root()
AttributeError: 'NoneType' object has no attribute '_root'

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Simple tkinter query about creating a tk,StringVar() failure paul.hermeneutic@gmail.com - 2016-02-06 17:38 -0700

csiph-web