Re: [pygame] On the Posting of Projects

2007-12-11 Thread Patrick Mullen
Good advice, however I feel that the people who would most benefit
from it may not be listening here.  Also, even though it's linked on
the front page, I always seem to forget about the cookbook.  Thanks
for the reminder.  The next time I do something I feel is
clever/useful, maybe I'll put it there, since an actual distributable
project is so rare!

I would also like to add that people who have nothing yet to show of
their project has no business posting.  It's called a release, maybe
if there were a pre-release section it would be different.  If you cry
wolf by "announcing" a release, people may skip over the next release
which actually has something to say.

Are there any moderator abilities to go through and remove some of the
spam?  Possibly with a warning first?

On an unrelated website note, I would like to be able to remain logged
in to the web site.  It didn't used to be a problem when I would only
log in every month or so, but lately I have wanted to comment more
often.  Could this be added Phil Hassey?


Re: [pygame] piman's tutorial.Class variable usage.

2007-12-11 Thread René Dudfield
yeah, similar to static variables.

They are shared between all instances of that class.



On Dec 12, 2007 12:00 PM, Gabriel Hasbun <[EMAIL PROTECTED]> wrote:
> Hello,
>
> The piman's tutorial on sprites:
>
> http://kai.vm.bytemark.co.uk/~piman/writing/sprite-tutorial.shtml
>
> class MySprite(pygame.sprite.Sprite):
>  image = None
>
>  def __init__(self):
>  pygame.sprite.Sprite.__init__(self)
>
>  if MySprite.image is None:
>  # This is the first time this class has been instantiated.
>  # So, load the image for this and all subsequence instances.
>  MySprite.image = pygame.image.load("image.png")
>
>  self.image = MySprite.image
> Refers to MySprite.image , as variable common to all instances, I guess,
> somewhat a static member in C++, Am I right?
>
> This is more of a python question, I went through the docs but found nothing
> related.
>
> Thanks in advance.
>
>


[pygame] piman's tutorial.Class variable usage.

2007-12-11 Thread Gabriel Hasbun
Hello,

The piman's tutorial on sprites:

http://kai.vm.bytemark.co.uk/~piman/writing/sprite-tutorial.shtml


class MySprite(pygame.sprite.Sprite):
image = None

def __init__(self):
pygame.sprite.Sprite.__init__(self)

if MySprite.image is None:
# This is the first time this class has been instantiated.
# So, load the image for this and all subsequence instances.
MySprite.image = pygame.image.load("image.png")

self.image = MySprite.image
Refers to MySprite.image , as variable common to all instances, I guess, 
somewhat a static member in C++, Am I right?

This is more of a python question, I went through the docs but found nothing 
related.

Thanks in advance.

   
-
Never miss a thing.   Make Yahoo your homepage.

[pygame] On the Posting of Projects

2007-12-11 Thread Ian Mallett
Hi everyone,
There have recently been several releases on pygame.org by several
users that have little description, no screenshots, no download links,
etc.  I think that when one presents one's project, one should present
it proudly.  Give it a good screenshot, spend more than two seconds on
a description, and give someone a way to download and appreciate your
work.
Even if your program is just a library or something without need
for a screenshot, an informative title and description are even more
important.  We need to know what the program does, what it runs on,
what its title is, and where you can get executables or sources.  More
info is better.  You can organise your info with HTML code (stuff like
, , etc.).
If your code is just a tiny snippet, place it in the cookbook.
Don't give it a screenshot or download links.  People can just cut and
paste the code.
Ian