def show_cook_book_love(screen): txt = "I love the CookBook!" f = SysFont("Arial", 12) s = f.render(txt, 1, (0,0,0)) screen.blit(s, (0,0))

Posting A Recipe:

Generic recipes

[[Profiling]]
[[RunningInCorrectDirectory]]
[[LinearInterpolator]]
[[SmoothInterpolator]]
[[BoundingBox]]
[[2DVectorClass]]
[[3DVectorClass]]
[[CommandDispatch]] (A pattern for building GUIs)
[[2DGeometryEngine]]
[[QuadTree]]
[[MemoizingDecorator]] (Another lazy resource loader)
[[SignalSlot]] (A signal/slot implementation)
[[Interpolator]] (An improved interpolator)
[[BezierCurve]]
[[RGBColorConversion]]
[[CalculateDist]]
[[SpatialHashMap]]
[[ConstantGameSpeed]]

PyGame recipes

[[LazyImageLoading]]
[[SimpleFontManager]]
[[TTFToBitmapConverter]]
[[toggle_fullscreen]]
[[Joystick_analyzer]]
[[ImagePacker]]
[[SmallerRectForSpriteCollision]]
[[GradientCode]]
[[ConchMusicSoundToolkit]]
[[FastPixelPerfect]]
[[SettingWindowPosition]]
[[DummyVideoDriver]]
[[WindowResizing]]
[[TextWrapping]]
[[CairoPygame]]
[[Load_32-bit_BMP_with_Alpha]]
[[HeadlessNoWindowsNeeded]] (Use pygame without using creating a window)
[[SubtractRects]]
[[ShadowEffects]] (Using arrays)
[[MatplotlibPygame]]
[[IntersectingLineDetection]]
[[MmapSurfaces]]
[[WxPython]]
[[Pygame2exe]]
[[InputWrapper]]
[[RotateCenter]]
[[MidiScheduler]]
[[SpatialHash_for_Pygame]]
[[Spritesheet]]
[[Tint]]
[[SoundGeneration]]
[[DrawWaveform]]

PyOpenGL recipes

[[SimpleOpenGL2dClasses]]
[[OBJFileLoader]]
[[GLLight]]
[[GLSLExample]]
[[GLSL_ARB_Example]]
[[TextureCoordinateArithmetic]]
[[MakeOpenglDrawIn2D]]
[[CrossPlatformTextOpengl]]