Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Bus error -- driver executed.


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.12.1708833226.3452.python-list@python.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=29544&group=comp.lang.python#29544

  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 22:53:40 -0500
Lines: 121
Message-ID: <mailman.12.1708833226.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>
<07c401da679e$38c94860$aa5bd920$@SGA.Ninja>
Mime-Version: 1.0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de c18KIIP/l1JltIRJCtI0EA71aHAcrNoiN/L5acK151Jg==
Cancel-Lock: sha1:peJVK4ty+aOwcAXrXkQoa/GIrcc= sha256:sYSVRc48TG80Vtib/Alw0RUMY2Bm6sESRFF3wc/4Jes=
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=irDSFY7o;
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;
'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; '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; 'url-ip:188.166.95.178/32': 0.25; 'url-
ip:188.166.95/24': 0.25; 'python,': 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; 'do.': 0.32; 'python-
list': 0.32; 'window': 0.32; 'unless': 0.32; 'but': 0.32; 'same':
0.34; 'mean': 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; 'within': 0.69;
'global': 0.73; 'formatting': 0.76; 'sent:': 0.78; 'placement':
0.81; 'callback': 0.84; '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=nK8XhePTqzARXRclUzILeWUEurz4nLzDnqIWcURAajI=; b=irDSFY7ozYHzWdMJTF6ZBLkNtQ
uadyzSskM8Xo4acaiRBg/tdOFgDeeIVnuDgF06WAr8FAsBm6GI2PquuDf8AJzBV7cFBVj7Xi5p4WZ
OK3X6qpwc+PwcfAUXvtpU48G4amza6Zj5XGewLpB9OFMtcz8+9+SV7Wua9twET38OqrpGdbgBD4n2
l4SlrncjcDmt6A0+GInKRx2yvwO/3bHBbbIpNg0ZkUsou9LlK5GJ/kYJ2/eiJyl0fLpcgj+XdAz2n
KmQZPafs9qvo1z8jjSxk+SWcA94e6CvysGwirD85qBiLRbgGvo/+7qLs/VEz55r5wSXQpcqC1AqnR
rOqDb/nw==;
In-Reply-To: <69d31734-4ec6-4580-bd8e-1e7ae0c301ba@tompassin.net>
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AQJGy7zzXF4y2G8MeMWTWHq0fMItvQIzKKK2AzCygCMCTZHTpQJPWNtlAuepcsMCIock6AMtSgnUr6/hVeA=
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: <07c401da679e$38c94860$aa5bd920$@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>
<07b101da6795$97d57df0$c78079d0$@SGA.Ninja>
<69d31734-4ec6-4580-bd8e-1e7ae0c301ba@tompassin.net>
 by: Steve GS - Sun, 25 Feb 2024 03:53 UTC

The print statement in the
function prints.
Does that not mean that the
function is being called?

SGA

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

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

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

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor