Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Slice creates new objects?
Post: RE: Slice creates new objects?

Thanks guys. I'm still ramping up on Python and was confused..... these are great answers and understood. Really appreciate the quick responses!!!! -mark
fmr300 General Coding Help 4 1,296 Jul-20-2022, 12:34 PM
    Thread: Slice creates new objects?
Post: Slice creates new objects?

Can anybody help me understand this - In a function, when I slice the passed list, it creates a new list instead of affecting the callers passed-list. So in the code below, when I passed 'a' to the fu...
fmr300 General Coding Help 4 1,296 Jul-20-2022, 01:03 AM
    Thread: Raspberry Pi - 'Bullseye' broke Pygame
Post: Raspberry Pi - 'Bullseye' broke Pygame

I've been using Pi's OS, "Buster", which includes Python 3.7.3 and Pygame 1.9.4 and have had no problems. Just tried the latest Pi OS-release, "Bullseye", which includes Python 3.9.2 and Pygame 1.9.6...
fmr300 News and Discussions 0 1,217 Feb-18-2022, 12:02 AM
    Thread: Print controlled with global-var
Post: RE: Print controlled with global-var

(Feb-01-2022, 11:15 PM)Gribouillis Wrote: You could try myPrint = print if printFlag else (lambda *args, **kwargs: None) Nice. Works perfectly, and reminds me how weak my overall Python skills are!!
fmr300 General Coding Help 3 1,451 Feb-05-2022, 03:09 PM
    Thread: Print controlled with global-var
Post: Print controlled with global-var

In a script I'm working on, sometimes I'd like to turn off some of the print statements that are informative, while leaving the true-warning print's on. Is there a simple way to define a 'myPrint' fun...
fmr300 General Coding Help 3 1,451 Feb-01-2022, 10:58 PM
    Thread: Function global not readable by 'main'
Post: Function global not readable by 'main'

Wierd problem been trying to resolve for several hours - appreciate any help ! I'm runinng an ADC-sampler in a separate thread function, which logs the max-sample found during each second (approx). ...
fmr300 General Coding Help 1 1,335 Jan-15-2022, 10:46 PM
    Thread: stderr redirect to file
Post: RE: stderr redirect to file

Wow.... that's what happens when you're cutting and pasting (the original error). Amazing what another set of eyes can do. THANKS !!! **smile** **smile** **smile** **smile** **smile** **smil...
fmr300 General Coding Help 2 3,567 Apr-03-2021, 01:31 AM
    Thread: stderr redirect to file
Post: stderr redirect to file

I'm trying to redirect stderr to a file, and I've read the numerous posts here, but it's not working for me on a Pi or on my Win laptop. Hoping someone will see what's wrong. Using IDLE - On Pi, ...
fmr300 General Coding Help 2 3,567 Apr-02-2021, 10:50 PM
    Thread: mixer failing in 2.0
Post: mixer failing in 2.0

Just updated to Pygame 2 and have a problem that perhaps somebody has run into before. Here's the simple code that's failing, and the shell output further below. I added the print-statement just ...
fmr300 Game Development 5 4,954 Feb-21-2021, 05:59 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020