[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Bundling Pygame documents



This saves me some work.

René Dudfield wrote:
Nice one.  Full paths are required for platforms that don't have
relative paths (like windowsCE).

I updated all the examples to have a main(), and use pygame.quit.
Still need to update the cmd line argument ones to use main()
arguments.
I have been doing the same. But instead I will just wait until you commit your changes. I will add an optional device id argument to examples.midi. That way one can use a midi software cable to connect the keyboard to the input event displayer.

I think also the pygame.tests.run() could be passed arguments that can
be passed by command line arguments too.  That'll require a bit of a
refactor of though.  For example,  pygame.tests.run(randomize=True,
multi_thread=8, exclude="interactive")

A bit of work, but straight forward. All the argument parsing is done in test/test_utils/run_tests.py. It can be moved to test/go.py.

Lenard

cheers,


On Mon, Jan 12, 2009 at 4:09 PM, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
I was thinking of something like that myself. I just finished updating them
so the cwd doesn't have to be the examples directory. However, some of them
do expect command line arguments. I guess those could become main()
arguments. And the examples readme can be replaced with an examples.doc in
lib.

Lenard

René Dudfield wrote:
That's awesome :)

I wonder if we should be able to run the examples like...

import pygame.examples.chimp
pygame.examples.chimp.main()


Does that seem like a useful thing to be able to do?  I'm not so sure.
 How do people then look at, or edit the source code for the example?
It does make running the examples easier to explain.  No need for "put
python on your PATH, and   cd
c:\Python25\Lib\site-packages\pygame\examples\;  python chimp.py" and
the variations on each platform.



On Mon, Jan 12, 2009 at 7:42 AM, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:

Lenard Lindstrom wrote:

Hi,

If the Pygame documents are to be included as part of the Pygame
installation is there any reason to continue producing document bundles? And
who is taking responsibility for modifying setup.py to add the documents and
examples? If it is not on anyone's schedule the I will have a look at it.

Lenard


The Pygame documents and examples directories are now part of the Pygame
package (SVN 1816).