module documentation

Contains the top-level Window and global execution environment.

Class Window No class docstring; 6/10 properties, 0/12 instance variable, 0/2 constant, 3/15 methods documented
Function get_stage Undocumented
Function get_window @return the one and only window. None if start() hasn't been called.
Async Function next_frame Yields control until the next frame is drawn. @return Always True so that this can be used in a cannonical 'forever' loop: ``` while await next_frame(): sprite.turn(1) ```
Function set_stage Convenience to set the current stage on the window.
Function start Shows the window and starts the event loop. Never returns. There are many options that are all optional. It is best to always set these using the keyword parameters. @param whenStarted A function to call to perform initialization...
Async Function wait Asynchronously wait for the given amount of time, in seconds. At minimum this will wait until the next frame.
Class _RollingAverage Simple class to keep a circular buffer of the last N values and calculate a rolling average on them. The buffer starts out as zeros so that will skew the results at the beginning.
Variable _window Undocumented
def get_stage():

Undocumented

def get_window():

@return the one and only window. None if start() hasn't been called.

async def next_frame():

Yields control until the next frame is drawn. @return Always True so that this can be used in a cannonical 'forever' loop: ``` while await next_frame(): sprite.turn(1) ```

def set_stage(newStage):

Convenience to set the current stage on the window.

def start(whenStarted=None, stage=None, windowSize=None, windowTitle=None, fullScreen=False, backgroundColor=None, asyncioDebug=False):

Shows the window and starts the event loop. Never returns. There are many options that are all optional. It is best to always set these using the keyword parameters. @param whenStarted A function to call to perform initialization. This is usually only used if you are doing a simple functional program. If you're organizing using custom stages, then you'd probably make your sprites in stage.on_init(). @param stage If you make a custom stage, you can supply it here and it will be set as the window's stage. @param windowSize A tuple of (width, height) for how big to make the window. Default (800, 600). @param windowTitle Sets the name in the window title bar. @param fullScreen If true, use the full screen and windowSize is ignored. @param backgroundColor A scratchypy.color or pygame.color to use as the window background, default WHITE. @param asyncioDebug Advanced logging of Python asyncio calls.

async def wait(seconds=0):

Asynchronously wait for the given amount of time, in seconds. At minimum this will wait until the next frame.

_window =

Undocumented