Re: [pygame] memory leaks with Py_BuildValue

2008-09-04 Thread Nirav Patel
Thanks! Patch committed. Nirav On Wed, Sep 3, 2008 at 7:10 PM, Campbell Barton <[EMAIL PROTECTED]> wrote: > Heres more fixes to mask.c - Py_BuildValue returns a variable with 1 > ref and PyList_Append adds another. checked all other cases of > PyList_Append and they all seem correct. > > Index:

Re: [pygame] BUG: Inconsistent font behavior between Windows and Linux

2008-09-04 Thread Lenard Lindstrom
Attached is a C version of font_test.py. It takes a font size as its only argument. Running the program for both pitch 21 and 210 I get the same results as I get for font_test.py. Lenard Lenard Lindstrom wrote: I can't account for why the numbers match at a pitch of 210, but not 21. I did

Re: [pygame] BUG: Inconsistent font behavior between Windows and Linux

2008-09-04 Thread Lenard Lindstrom
I can't account for why the numbers match at a pitch of 210, but not 21. I did find the place in SDL_ttf where the dpi is set to the FreeType default of 72. And the post to the FreeType mailing list I referred to earlier, http://lists.nongnu.org/archive/html/freetype-devel/2002-08/msg00020.html

Re: [pygame] BUG: Inconsistent font behavior between Windows and Linux

2008-09-04 Thread Brian Fisher
Lenard, are you saying you think it still may be a dpi problem? cause I think if dpi was the problem in this case, the discrepancy would scale with font size. But as there is no discrepancy between the platforms when the font size is 210 (i.e. charlies gentoo matches your windows box), it seems to

Re: [pygame] BUG: Inconsistent font behavior between Windows and Linux

2008-09-04 Thread Lenard Lindstrom
I'm sure something can be put together. As for display point size, that may be the case with Windows, but what about Unix. To quote Charlie Nolan's quote of René: Looks like Gentoo builds a pretty standard SDL_ttf. No patches, it just specifies the various paths and passes on the system "Do I

Re: [pygame] Question - Comparing strings

2008-09-04 Thread Knapp
You guys bring up a point I have been meaning to ask somewhere with good python coders. I need a mentor/tutor for python. I have a program that is badly written (It works with no known bugs though) and I need someone with a big club to help we clean it up and become a better python programmer at th

Re: [pygame] Question - Comparing strings

2008-09-04 Thread Ian Mallett
On Thu, Sep 4, 2008 at 11:36 AM, Casey Duncan <[EMAIL PROTECTED]> wrote: > > Consistency within your own code is probably most important. But if you are > writing a library that you expect other people to use, following the pep 8 > guidelines is a very good idea. Conventions like these, however arb

Re: [pygame] Question - Comparing strings

2008-09-04 Thread Ron Dippold
Hi esc, Other people have mostly answered your questions, but I would highly recommend anyone new to the language read Dive Into Python to get a sense of how to use it in practice. You can even read it online (for free) at http://diveintopython.org/ then perhaps buy the book if you like it.

Re: [pygame] Question - Comparing strings

2008-09-04 Thread Hugo Arts
Wait a second, I always thought it was called PascalCase, and camelCase is like that On Thu, Sep 4, 2008 at 1:36 PM, Casey Duncan <[EMAIL PROTECTED]> wrote: > On Sep 4, 2008, at 12:12 PM, Ian Mallett wrote: > >> On Thu, Sep 4, 2008 at 8:15 AM, kschnee <[EMAIL PROTECTED]> wrote: On a >> dissenting

Re: [pygame] Question - Comparing strings

2008-09-04 Thread Casey Duncan
On Sep 4, 2008, at 12:12 PM, Ian Mallett wrote: On Thu, Sep 4, 2008 at 8:15 AM, kschnee <[EMAIL PROTECTED]> wrote: On a dissenting note, I'm one of those deviants who names functions with CamelCase, on the theory that lc_with_underscores confuses functions and variables. Me as well--only I

Re: [pygame] Question - Comparing strings

2008-09-04 Thread Ian Mallett
On Thu, Sep 4, 2008 at 8:15 AM, kschnee <[EMAIL PROTECTED]> wrote: > > On a dissenting note, I'm one of those deviants who names functions with > CamelCase, on the theory that lc_with_underscores confuses functions and > variables. Me as well--only I use uppercase for pretty much everything--from

Re: [pygame] Question - Comparing strings

2008-09-04 Thread Hugo Arts
On Thu, Sep 4, 2008 at 10:15 AM, kschnee <[EMAIL PROTECTED]> wrote: > >> if WordListFile == "default" or "default" or "Default" or "d" or "D": > > > > This does not do what you think it does. What you want is this: > > if word_list_file.lower() in ("default", "d"): > > By way of further explanatio

Re: [pygame] Question - Comparing strings

2008-09-04 Thread kschnee
On Thu, 4 Sep 2008 08:29:51 -0500, "Charlie Nolan" <[EMAIL PROTECTED]> wrote: >> def WordSelection(): > > In Python, we write function names like_this. CamelCase is for > classes, UPPERCASE for constants. Everything else gets > lowercase_with_underscores. It's just a style convention, but it >

Re: [pygame] Question - Comparing strings

2008-09-04 Thread Brad Montgomery
>>> hope someone can help, >>> - esc You may want to find an Introductory Python book for these kind of questions. There are several from which to choose (some of which are free!). Check out http://diveintopython.org/ There's also great places to look here (which is where I started): http:

Re: [pygame] Question - Comparing strings

2008-09-04 Thread Charlie Nolan
Okay, I admit it, I'm bored enough to look deeper. Offhand, I see a few things that don't fit right. > def WordSelection(): In Python, we write function names like_this. CamelCase is for classes, UPPERCASE for constants. Everything else gets lowercase_with_underscores. It's just a style conve

[pygame] Re: Question - Comparing strings

2008-09-04 Thread escapedpolarbear
Ah, terribly sorry. But thanks for the help, -Esc __ On Sep 4, 2:08 pm, "Charlie Nolan" <[EMAIL PROTECTED]> wrote: > Glad to see a new newbie, it's the only way to get experts. On the > other hand, this is the *pygame* mailing list. We use python, but > it's not exactly the topic at hand.

Re: [pygame] Question - Comparing strings

2008-09-04 Thread Charlie Nolan
Glad to see a new newbie, it's the only way to get experts. On the other hand, this is the *pygame* mailing list. We use python, but it's not exactly the topic at hand. For more general discussion, try one of the places listed here: http://python.org/community/ That said, I'm a nice guy, so yo

Re: [pygame] problem - movie in pygame

2008-09-04 Thread Pedro Vieira
Thank you for your reply. I tried to use PyGlet. The video and audio are sync, but it seems that FPS is slow and, because of that, the quality of the image and sound isn't good. I'll try to use those options that you said.

[pygame] Question - Comparing strings

2008-09-04 Thread escapedpolarbear
Hey, I only recently found out about Python and started looking at it a week ago. It seems like a brilliant coding language. I'm starting by making a small simple "guess the word" (hangman clone) type game. The game selects a random word from a .txt file (with the option to either use the standar