Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Clothes make the man. Naked people have little or no influence on society. -- Mark Twain


devel / comp.lang.python / Re: library not initialized pygame

SubjectAuthor
o Re: library not initialized pygameDennis Lee Bieber

1
Re: library not initialized pygame

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: wlfr...@ix.netcom.com (Dennis Lee Bieber)
Newsgroups: comp.lang.python
Subject: Re: library not initialized pygame
Date: Tue, 04 May 2021 22:52:19 -0400
Organization: IISS Elusive Unicorn
Lines: 54
Message-ID: <mailman.142.1620184452.3087.python-list@python.org>
References: <CAO9VG=j9FoNjEFkaGYAmfY5Db4NpBSUS49ZLcksUhDCBju4g5g@mail.gmail.com>
<1f539g1msn015hf9c5d417611k2f130br0@4ax.com>
<qp149gdgunpsva4o7ib2jltb7os98htdkf@4ax.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de oPvT6aUZNkwF5BN7w7CuwAhboBMcqOo1X5HnbfOscaMw==
Return-Path: <python-python-list@m.gmane-mx.org>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.006
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'loop': 0.07;
'subject:library': 0.07; 'diff': 0.09; 'nasty': 0.09;
'received:ciao.gmane.io': 0.09; 'received:gmane.io': 0.09;
'received:list': 0.09; 'subject:not': 0.09; 'correcting': 0.16;
'message-id:@4ax.com': 0.16; 'received:116.202': 0.16;
'received:116.202.254': 0.16; 'received:116.202.254.214': 0.16;
'subject:pygame': 0.16; 'tue,': 0.18; 'to:addr:python-list': 0.23;
'lines': 0.24; 'skip:p 30': 0.26; 'bit': 0.28; '(and': 0.30;
'header:User-Agent:1': 0.31; 'header:Organization:1': 0.31;
'think': 0.31; 'files': 0.33; 'running': 0.35; '"if': 0.35;
'event': 0.38; 'main': 0.40; 'true': 0.63; 'received:116': 0.71;
'2021': 0.84; 'rid': 0.84; 'true:': 0.84; 'url-ip:76/8': 0.84;
'newly': 0.93
X-Injected-Via-Gmane: http://gmane.org/
User-Agent: ForteAgent/8.00.32.1272
X-No-Archive: YES
X-Mailman-Approved-At: Tue, 04 May 2021 23:14:11 -0400
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
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: <qp149gdgunpsva4o7ib2jltb7os98htdkf@4ax.com>
X-Mailman-Original-References: <CAO9VG=j9FoNjEFkaGYAmfY5Db4NpBSUS49ZLcksUhDCBju4g5g@mail.gmail.com>
<1f539g1msn015hf9c5d417611k2f130br0@4ax.com>
 by: Dennis Lee Bieber - Wed, 5 May 2021 02:52 UTC

On Tue, 04 May 2021 15:35:04 -0400, Dennis Lee Bieber
<wlfraed@ix.netcom.com> declaimed the following:

>
> After much restructuring, commenting out the lines that load files I
>don't have (and correcting typos)...
>
After a bit of thought, I think I can get rid of that nasty "if not
running: break".

Here's the DIFF from what I previously posted to the newly restructured
program...

@@ -29,6 +29,7 @@
items_picked_up = 0
items_left = 3
- while True:
- running = True
+ running = True
+ while running:
+
screen.fill(BLACK)
@@ -34,12 +35,5 @@
screen.fill(BLACK)
- - for event in pygame.event.get():
- if event.type == pygame.QUIT:
- running = False
- break #exit event loop
- - if not running: break #exit main loop
-
+
## pygame.mixer.music.load("onoken - load.mp3")
## pygame.mixer.music.play(10, 0, 3)
song_text = font.render("Song: onoken - load", True, WHITE)
@@ -64,6 +58,10 @@
True, WHITE), INSTRUCTIONCOORDS3)
pygame.display.update()
+
+ for event in pygame.event.get():
+ if event.type == pygame.QUIT:
+ running = False
pygame.quit()

--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/


devel / comp.lang.python / Re: library not initialized pygame

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor