Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

"I may kid around about drugs, but really, I take them seriously." -- Doctor Graper


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

SubjectAuthor
o Re: Problem resizing a window and button placementThomas Passin

1
Re: Problem resizing a window and button placement

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: list1@tompassin.net (Thomas Passin)
Newsgroups: comp.lang.python
Subject: Re: Problem resizing a window and button placement
Date: Sat, 24 Feb 2024 22:38:36 -0500
Lines: 76
Message-ID: <mailman.10.1708832328.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>
<69d31734-4ec6-4580-bd8e-1e7ae0c301ba@tompassin.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de CNSne1otgfwBhKQ4bIZj8wz3Wkhdpz6JNChiA6ipijaQ==
Cancel-Lock: sha1:MjgyB/F0GEM5WySYlfB/afzOeCU= sha256:n9NEB5txHXz0TsOmuslqTx6WHPgQbtV2IQWHCO3zOdo=
Return-Path: <list1@tompassin.net>
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=tompassin.net header.i=@tompassin.net header.b=mRr05d61;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.001
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'def': 0.04; 'yet.': 0.04;
'variable': 0.05; 'spaces': 0.07; 'tkinter': 0.07; 'apparently':
0.09; 'email addr:python.org>': 0.09; "hasn't": 0.09; 'readable':
0.09; 'resizing': 0.09; 'import': 0.15; 'problem.': 0.15; 'that.':
0.15; '2024': 0.16; 'declare': 0.16; 'earlier,': 0.16;
'functions,': 0.16; 'received:10.0.0': 0.16; 'received:64.90':
0.16; 'received:64.90.62': 0.16; 'received:64.90.62.162': 0.16;
'received:dreamhost.com': 0.16; 'tab.': 0.16; 'using?': 0.16;
'variable.': 0.16; 'written.': 0.16; 'wrote:': 0.16; 'problem':
0.16; 'python': 0.16; 'instead': 0.17; 'pm,': 0.19; 'to:addr
:python-list': 0.20; 'all,': 0.20; 'run': 0.23; 'skip:- 10': 0.25;
'python,': 0.25; 'tried': 0.26; 'local': 0.27; 'coming': 0.27;
'function': 0.27; 'header:User-Agent:1': 0.30; 'code,': 0.31;
'do.': 0.32; 'python-list': 0.32; 'received:10.0': 0.32;
'received:mailchannels.net': 0.32;
'received:relay.mailchannels.net': 0.32; 'window': 0.32; 'unless':
0.32; 'but': 0.32; 'same': 0.34; 'header:In-Reply-To:1': 0.34;
'yes,': 0.35; 'functions': 0.36; 'others': 0.37; 'use': 0.39;
'neither': 0.39; 'rest': 0.39; 'steve': 0.39; 'wrote': 0.39;
'both': 0.40; 'try': 0.40; 'should': 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; 'let': 0.66;
'shows': 0.67; 'header:Received:6': 0.67; 'received:64': 0.67;
'within': 0.69; 'global': 0.73; 'formatting': 0.76; 'sent:': 0.78;
'placement': 0.81; 'callback': 0.84; 'saturday,': 0.84
X-Sender-Id: dreamhost|x-authsender|tpassin@tompassin.net
ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1708832318; a=rsa-sha256;
cv=none;
b=NDkNY3zOsk5ZEBV3zNTdNnPUjTLRrhYWfBzdYR+BshVgIfAXmDAOZS9Sd4Sw6VGbf6q1lL
Te/iuoPaks9W6Z1IVkk9p8WPwuZ99D+HIk7q7Xhf0burr0r7pZFy/7olrj15JBVCFIszNc
1HiFGwSQhUeUpRLycs9XdEhAsu2XJuqTLCl1QrvkQqSd2AgaUcOoyIibhPrudnJkHo0CyK
WB6D2E9PoHmQb6kMiHrDXnS+o9IQGwX6+EztlQzxVCJPGZcse/YesHl17gm1SroD9vJStY
8F9EHgcbe+nG+tsvekWBLL41cud5krddvDaiWQmUtBrKRpSOwN8iQFkOdLkpKw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
d=mailchannels.net; s=arc-2022; t=1708832318;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:dkim-signature;
bh=+pdGTPCA4EHP3SFrWIAqYa+MG4c6pd0jbm8+qj/ofu4=;
b=GFQLr6Kxz/MtOPg50pczapV9StOAPWStKjP1i/pKORZIsRy8ujjDMSYKJsGDNPfferI65I
Ump5U7ZqLG+uW0YnYR6Pv6cwX2k2U68irAa0/21SILnTwm3kpGIOelQTcA2w6rrlCaTYCv
dpKsB2NZ85scG4vfCIEev9PWnSoWhrY2DELwiI07+KjRrSrT29qzQglTRHfTdw208AMuwY
X9fhbZWTyieA7YDMbhwYNun5AADqA9jainaQOQzGvTwF9zXYW0f0AuLIaSYrGuaI5r/cVL
7Jd3Th7jmtBJBL2kxdkEC9uq6E8jUkQjGmzOzPeiEN3JTt4X5RQqVndhurE3/Q==
ARC-Authentication-Results: i=1; rspamd-55b4bfd7cb-jlpd4;
auth=pass smtp.auth=dreamhost smtp.mailfrom=list1@tompassin.net
X-Sender-Id: dreamhost|x-authsender|tpassin@tompassin.net
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|tpassin@tompassin.net
X-MailChannels-Auth-Id: dreamhost
X-Shade-Lonely: 12665399055449fd_1708832318478_2171029729
X-MC-Loop-Signature: 1708832318477:2753349227
X-MC-Ingress-Time: 1708832318477
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tompassin.net;
s=dreamhost; t=1708832318;
bh=+pdGTPCA4EHP3SFrWIAqYa+MG4c6pd0jbm8+qj/ofu4=;
h=Date:Subject:To:From:Content-Type:Content-Transfer-Encoding;
b=mRr05d61d0J6MKNY2Dxvyd2ztUCYAHKsr728t49HSVT06ovEPlq10rU1ddH3yjUvy
S0bv0ovxoR8vfVkkVL8CGSSmI3uApev8B2JN0hL9ao04X/LFY+P7MGi7jndgRdyIxZ
ZpuPH3+ONj3zlNROl/amJ/6H0pZXOFn6PUUBMpkBLMIwZNgBb4lJbuOzz1iRHAxKU4
NSCBZS36dpTd8Gkvcmgb68LWxMZkCN+1D9ebmsLJ5xxSZ6j2YzcERRU7lVcrBa7WCy
nGBrb6aNYLK063+SMzbE7eYbEJlkaLYl/R7morUl1VMYyzaMzSA+R+Cz1FR0imXIJZ
3tE0lGnLiTh6A==
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <07b101da6795$97d57df0$c78079d0$@SGA.Ninja>
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: <69d31734-4ec6-4580-bd8e-1e7ae0c301ba@tompassin.net>
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>
<07b101da6795$97d57df0$c78079d0$@SGA.Ninja>
 by: Thomas Passin - Sun, 25 Feb 2024 03:38 UTC

On 2/24/2024 9:51 PM, Steve GS via Python-list wrote:
First of all, please make sure that the formatting is readable and
especially the indentation. This is Python, after all.

Do not use tabs; use 3 or 4 spaces instead of each tab.
> 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

The function that declares Ww hasn't run yet. As I wrote earlier, the
function bound to the callback should do all the work for the callback,
or it should call other functions that do. That's if you don't let a
layout do it all for you, as others have written.

> 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.
>

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor