强大的python界面和多媒体库-pyglet

先提供官网: 

http://pyglet.org/

 

我们知道python 本身提供了界面库和多媒体库,但是确实不好用。

 

我们在界面的时候可以使用PyQT库,和xWidget。而开发多媒体的时候则用本文提到的pyglet库。先来看看这些特性:

  • 扩平台,支持windows, Max OS, Linux
  • 可以创建任意多的窗口,支持多监视器和开发全屏游戏
  • 可以操作几乎所有格式的图片
  • 可以播放所有的音频和视频,例如mp3, ogg/Vorbis, wma, DivX, mpeg-2, h264, wmv, Xvid.

     

    更重要的他是免费的,遵循BSD开源软件协议。你可以在你的商业软件中去使用它。

     

    下载它就去官网:

    http://pyglet.org/

     

    网站有详细的文档介绍怎么安装和使用。

     

    下面列出它所提供的模块,其实从下列列表中你也能知道它能做些什么了:

    Submodules

      pyglet.app

    Application-wide functionality.
      pyglet.clock

    Precise framerate calculation, scheduling and framerate limiting.
      pyglet.event

    Event dispatch framework.
      pyglet.font

    Load fonts and render text.
      pyglet.font.base

    Abstract classes used by pyglet.font implementations.
      pyglet.gl

    OpenGL and GLU interface.
      pyglet.gl.gl_info

    Information about version and extensions of current GL implementation.
      pyglet.gl.glu_info

    Information about version and extensions of current GLU implementation.
      pyglet.graphics

    Low-level graphics rendering.
      pyglet.graphics.allocation

    Memory allocation algorithm for vertex arrays and buffers.
      pyglet.graphics.vertexattribute

    Access byte arrays as arrays of vertex attributes.
      pyglet.graphics.vertexbuffer

    Byte abstractions of Vertex Buffer Objects and vertex arrays.
      pyglet.graphics.vertexdomain

    Manage related vertex attributes within a single vertex domain.
      pyglet.image

    Image load, capture and high-level texture functions.
      pyglet.image.atlas

    Group multiple small images into larger textures.
      pyglet.info

    Get environment information useful for debugging.
      pyglet.media

    Audio and video playback.
      pyglet.resource

    Load application resources from a known path.
      pyglet.sprite

    Display positioned, scaled and rotated images.
      pyglet.text

    Text formatting, layout and display.
      pyglet.text.caret

    Provides keyboard and mouse editing procedures for text layout.
      pyglet.text.document

    Formatted and unformatted document interfaces used by text layout.
      pyglet.text.formats

    Document formats.
      pyglet.text.formats.attributed

    Extensible attributed text format for representing pyglet formatted documents.
      pyglet.text.formats.html

    Decode HTML into attributed text.
      pyglet.text.formats.plaintext

    Plain text decoder.
      pyglet.text.formats.structured

    Base class for structured (hierarchical) document formats.
      pyglet.text.layout

    Render simple text and formatted documents efficiently.
      pyglet.text.runlist

    Run list encoding utilities.
      pyglet.window

    Windowing and user-interface events.
      pyglet.window.event

    Events for
    pyglet.window
    .
      pyglet.window.key

    Key constants and utilities for pyglet.window.
      pyglet.window.mouse

    Mouse constants and utilities for pyglet.window.
  • 版权所有,禁止转载. 如需转载,请先征得博主的同意,并且表明文章出处,否则按侵权处理.

      分享到:

    Leave a Reply

    Your email address will not be published. Required fields are marked *