Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

"We will bury you." -- Nikita Kruschev


devel / comp.lang.python / RE: Problem resizing a window and button placement

SubjectAuthor
o RE: Problem resizing a window and button placementSteve GS

1
RE: Problem resizing a window and button placement

<mailman.9.1708829525.3452.python-list@python.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25359&group=comp.lang.python#25359

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: Gronicus@SGA.Ninja (Steve GS)
Newsgroups: comp.lang.python
Subject: RE: Problem resizing a window and button placement
Date: Sat, 24 Feb 2024 21:51:54 -0500
Lines: 68
Message-ID: <mailman.9.1708829525.3452.python-list@python.org>
References: <06f101da66da$902357f0$b06a07d0$@SGA.Ninja>
<C72A9439-2300-4DCD-8A56-7C3AAE718EF4@barrys-emacs.org>
<070d01da66fa$5faea870$1f0bf950$@SGA.Ninja>
<31caf694-99fd-41ca-a98c-cb0d5d4a758e@tompassin.net>
<077801da6782$4f6046d0$ee20d470$@SGA.Ninja>
<13edcbad-1914-424c-97aa-3679eaf77fd8@mrabarnett.plus.com>
<07b101da6795$97d57df0$c78079d0$@SGA.Ninja>
Mime-Version: 1.0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de uu1mZI+1TKKvBs6LFV61rwrmBBHob+Pfe90Gr3FULTpg==
Cancel-Lock: sha1:ZteDt28sH/uO6T2pEXzVSSH9BYI= sha256:SDBw2/Deqgw5ZdJxMEmfhwGNW7B8jzuNd+kVq+I2kNQ=
Return-Path: <Gronicus@SGA.Ninja>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=sga.ninja header.i=@sga.ninja header.b=T1s5x5UW;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.007
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'def': 0.04; 'variable':
0.05; 'tkinter': 0.07; 'apparently': 0.09; 'resizing': 0.09;
'import': 0.15; 'problem.': 0.15; 'that.': 0.15; '2024': 0.16;
'declare': 0.16; 'from:addr:gronicus': 0.16;
'from:addr:sga.ninja': 0.16; 'functions,': 0.16; 'message-
id:@SGA.Ninja': 0.16; 'received:floathosting.com': 0.16;
'received:mars.floathosting.com': 0.16; 'using?': 0.16;
'variable.': 0.16; 'wrote:': 0.16; 'problem': 0.16; 'python':
0.16; 'to:addr:python-list': 0.20; 'skip:- 10': 0.25; 'url-
ip:188.166.95.178/32': 0.25; 'url-ip:188.166.95/24': 0.25; 'url-
ip:188.166/16': 0.25; 'tried': 0.26; 'local': 0.27; 'coming':
0.27; 'function': 0.27; 'code,': 0.31; 'url-ip:188/8': 0.31;
'python-list': 0.32; 'window': 0.32; 'unless': 0.32; 'but': 0.32;
'same': 0.34; 'header:In-Reply-To:1': 0.34; 'yes,': 0.35; 'use':
0.39; 'neither': 0.39; 'rest': 0.39; 'steve': 0.39; 'both': 0.40;
'try': 0.40; 'helps': 0.60; 'method': 0.61; 'skip:o 10': 0.61;
'from:': 0.62; 'to:': 0.62; 'skip:o 20': 0.63; 'button': 0.64;
're:': 0.64; 'shows': 0.67; 'within': 0.69; 'global': 0.73;
'sent:': 0.78; 'placement': 0.81; 'saturday,': 0.84
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sga.ninja;
s=default;
h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:
Date:Subject:In-Reply-To:References:To:From:Sender:Reply-To:Cc:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
List-Post:List-Owner:List-Archive;
bh=fj9np4GSVSUQXeEkOK8YWKXfgE0AUfhsh64ynoaJM8c=; b=T1s5x5UWMLTIhJmaRAY/COcP7h
6Ojkq1nTiFvoY4yuV0PAjKoQdCRt+0lMD/C57MEzzCWN8fcQRHG8JZvip+hzKnb+Mv3E/hW0WT5Qq
DVkN28l5NOmAXRw7ORcIJaS3PfqCM8bz4V/Mp50frM1qCZim1U9/c/EOLRMf5vZWbdz9WicFI9+VT
uHABLrvwhbS3EXUQPYQ1iruHtN9k+Lg1jLaHiLtz7lOx/emQRWETF/rlJc7Rv6sWgaUS4r4dgcHG6
joiVOnLkTU5GG0goUzQHdBDwJJk/u0HvKwxwYf686MMlgnsl9QTOWPZleLZuzii0x+pf0AQTXd7+N
lqHc8Elw==;
In-Reply-To: <13edcbad-1914-424c-97aa-3679eaf77fd8@mrabarnett.plus.com>
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AQJGy7zzXF4y2G8MeMWTWHq0fMItvQIzKKK2AzCygCMCTZHTpQJPWNtlAuepcsOv2lAUMA==
Content-Language: en-us
X-AntiAbuse: This header was added to track abuse,
please include it with any abuse report
X-AntiAbuse: Primary Hostname - mars.floathosting.com
X-AntiAbuse: Original Domain - python.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - SGA.Ninja
X-Get-Message-Sender-Via: mars.floathosting.com: authenticated_id:
gronicus@sga.ninja
X-Authenticated-Sender: mars.floathosting.com: gronicus@sga.ninja
X-Source:
X-Source-Args:
X-Source-Dir:
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
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: <https://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>
X-Mailman-Original-Message-ID: <07b101da6795$97d57df0$c78079d0$@SGA.Ninja>
X-Mailman-Original-References: <06f101da66da$902357f0$b06a07d0$@SGA.Ninja>
<C72A9439-2300-4DCD-8A56-7C3AAE718EF4@barrys-emacs.org>
<070d01da66fa$5faea870$1f0bf950$@SGA.Ninja>
<31caf694-99fd-41ca-a98c-cb0d5d4a758e@tompassin.net>
<077801da6782$4f6046d0$ee20d470$@SGA.Ninja>
<13edcbad-1914-424c-97aa-3679eaf77fd8@mrabarnett.plus.com>
 by: Steve GS - Sun, 25 Feb 2024 02:51 UTC

import tkinter as tk

#global Ww Neither global
helps
def on_configure(*args):
# print(args)
#global Ww Neither
global helps
Ww = root.winfo_width()
print("WwInside = <" +
str(Ww) + ">")

root = tk.Tk()
root.bind('<Configure>',
on_configure)
print("WwOutside = <" +
str(Ww) + ">")
#NameError: name 'Ww' is not
defined
root.mainloop()

SGA

-----Original Message-----
From: Python-list
<python-list-bounces+gronicus=
sga.ninja@python.org> On
Behalf Of MRAB via Python-list
Sent: Saturday, February 24,
2024 7:49 PM
To: python-list@python.org
Subject: Re: Problem resizing
a window and button placement

On 2024-02-25 00:33, Steve GS
via Python-list wrote:
> "Well, yes, in Python a
> variable created inside a
> function or method is local
to
> that function unless you
> declare it global."
>
> Yes, I knew that. I tried to
> global it both before the
> function call and within it.
> Same for when I created the
> variable. If I try to use it
> in the rest of the code, it
> keeps coming up as not
> declared. In other
functions,
> I can 'return' the variable
> but that apparently would
not
> work for this function.
>
> Is this type of function any
> different that that which I
> have been using?
>
Please post a short example
that shows the problem.

--
https://mail.python.org/mailma
n/listinfo/python-list

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor