code
stringlengths
1
1.72M
language
stringclasses
1 value
#!/usr/bin/env python '''Testing flat map allow_oob enforcement. Press arrow keys to move view focal point (little ball) around map. Press "o" to turn allow_oob on and off. You should see no black border with allow_oob=False. Press escape or close the window to finish the test. ''' __docformat__ = 'restructuredtex...
Python
#!/usr/bin/env python '''Testing rect map debug rendering. You should see a checkered square grid. Press escape or close the window to finish the test. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest from render_base import RenderBase import scene2d from scene2d.debug import gen_rect_ma...
Python
#!/usr/bin/env python '''Testing flat map scrolling. Press arrow keys to move view focal point (little ball) around map. You will be able to move "off" the map. Press escape or close the window to finish the test. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest from render_base import ...
Python
#!/usr/bin/env python '''Base class for rendering tests. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import os import unittest from pyglet.gl import * import pyglet.window from pyglet.window.event import * from pyglet.window import key from pyglet import clock from scene2d import * from scene2d.draw...
Python
#!/usr/bin/env python '''Testing mouse interaction The cell the mouse is hovering over should highlight in red. Clicking in a cell should highliht that cell green. Clicking again will clear the highlighting. Clicking on the ball sprite should highlight it and not underlying cells. You may press the arrow keys to s...
Python
#!/usr/bin/env python '''Testing a sprite. The ball should bounce off the sides of the window. You may resize the window. This test should just run without failing. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import os import unittest from pyglet.gl import glClear import pyglet.window import pygle...
Python
#!/usr/bin/env python '''Testing loading of a map. You should see a simple map with a circular road on it. The tiles are not well-designed :) Press escape or close the window to finish the test. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import os import unittest from render_base import RenderBase...
Python
#!/usr/bin/env python '''Testing the map model. This test should just run without failing. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest from pyglet.window import Window from scene2d import RectMap, HexMap, RectCell, HexCell from scene2d.debug import gen_hex_map, gen_rect_map rmd = [...
Python
#!/usr/bin/env python '''Testing the sprite model. This test should just run without failing. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest from pyglet.window import Window from pyglet.image import SolidColorImagePattern from scene2d import Sprite, Image2d class SpriteModelTest(unitt...
Python
#!/usr/bin/env python '''Testing flat map allow_oob enforcement. Press 0-9 to set the size of the view in the window (1=10%, 0=100%) Press arrow keys to move view focal point (little ball) around map. Press "o" to turn allow_oob on and off. You should see no black border with allow_oob=False. Press escape or close...
Python
# Lots Of Sprites ''' Results (us per sprite per frame): sprites AMD64/mesa AMD64/nv6.6k MacBook Pro AMD/nv7.8k 2000 28.3 29.3 20.6 22.0 after __slots__ removal sprites AMD64/mesa AMD64/nv6.6k MacBook Pro AMD/nv7.8k 2000 ''' import os import sys import random from pyglet ...
Python
import sys sys.path.insert(0, '/home/richard/src/pyglet.googlecode.com/trunk') import os import math import pyglet.window from resource import * from pyglet.window import key from pyglet import clock from scene2d import * from scene2d.textsprite import * from pyglet import font from layout import * class RocketSpri...
Python
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' from pyglet.window import Window from pyglet import clock from scene2d.textsprite import * from pyglet import font width, height = 640, 480 window = Window(width=width, height=height) arial = font.load('Arial', 500, bold=True) co...
Python
import os import math import pyglet.window from pyglet.window.event import * from pyglet.window import key from pyglet import clock from euclid import Vector2, Matrix3 from scene2d import * class CarSprite(RotatableSprite): def update(self, dt): # handle input and move the car self.angle += (keybo...
Python
#!/usr/bin/env python '''Example of simple text wrapping without using layout. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' from pyglet.gl import * from pyglet.window import Window from pyglet.window import key from pyglet import clock from pyglet import font from scene2d.textsprite import * window =...
Python
import os import math import pyglet.window from resource import * from pyglet.window import key from pyglet import clock from scene2d import * class PlayerSprite(Sprite): bullets = [] def update(self, dt): self.x += (keyboard[key.RIGHT] - keyboard[key.LEFT]) * 200 * dt if self.left < 0: self.l...
Python
class Rect(object): '''Define a rectangular area. Many convenience handles and other properties are also defined - all of which may be assigned to which will result in altering the position and sometimes dimensions of the Rect. The Rect area includes the bottom and left borders but not the top an...
Python
Blocker = object() Start = False End = object() class Path(dict): @classmethod def determine_path(cls, field, width, height): path = cls() path.width = width path.height = height path.ends = set() path.starts = [] cells = [] for y in range(height): ...
Python
# desktop tower defense clone import math import random from pyglet import window from pyglet import image from pyglet import resource from pyglet import clock from pyglet.window import mouse import view import tilemap import spryte import path field_cells = ''' +++++++++++EEEEE++++++++++++ +##########.....########...
Python
# Lots Of Sprites ''' Results for 2000 sprites: platform us per sprite per frame --------------------------------------------------------------------- Intel C2Quad Q6600 (2.4GHz), GeForce 7800 18.2478245656 Intel C2Duo T7500 (2.2GHz), GeForce 8400M GS 19.115903827 AMD 64 3500...
Python
import sys import random import math from pyglet import window from pyglet import clock from pyglet import resource import spryte NUM_CARS = 100 if len(sys.argv) > 1: NUM_CARS = int(sys.argv[1]) win = window.Window(vsync=False) fps = clock.ClockDisplay(color=(1, 1, 1, 1)) cars = spryte.SpriteBatch() car = reso...
Python
import random import math from pyglet import window from pyglet import image from pyglet import clock from pyglet import gl from pyglet import resource from pyglet.window import key import spryte win = window.Window(width=640, height=400,vsync=False) fps = clock.ClockDisplay(color=(1, 1, 1, 1)) balls = spryte.Sprit...
Python
import operator from pyglet import gl, event import spryte import tilemap class View(object): '''Render a flat view of a scene2d.Scene. Attributes: scene -- a scene2d.Scene instance allow_oob -- indicates whether the viewport will allow viewing of ...
Python
import os import math from pyglet import image, gl, clock, graphics, sprite class SpriteBatchGroup(graphics.Group): def __init__(self, x, y, parent=None): super(SpriteBatchGroup, self).__init__(parent) self.x, self.y = x, y def set(self): if self.x or self.y: gl.glTranslat...
Python
from pyglet import image import spryte class Map(spryte.SpriteBatch): '''Rectangular map. "cells" argument must be a row-major list of lists of Sprite instances. ''' def set_cells(self, cell_width, cell_height, cells, origin=None): self.cell_width, self.cell_height = cell_width, cell_height ...
Python
import os import math from pyglet import window from pyglet import resource from pyglet import image from pyglet.window import key from pyglet import clock import spryte import view win = window.Window(vsync=False) fps = clock.ClockDisplay(color=(1, 1, 1, 1)) map = [ [ 0, 1, 1, 1, 2, 3], [ 5, 6, 16, 1...
Python
import sys import random from pyglet import window from pyglet import image from pyglet import clock from pyglet import resource import spryte NUM_BOOMS = 20 if len(sys.argv) > 1: NUM_BOOMS = int(sys.argv[1]) win = window.Window(vsync=False) fps = clock.ClockDisplay(color=(1, 1, 1, 1)) explosions = spryte.Spri...
Python
''' Code by Richard Jones, released into the public domain. Beginnings of something like http://en.wikipedia.org/wiki/Thrust_(video_game) ''' import sys import math import euclid import primitives import pyglet from pyglet.window import key from pyglet.gl import * window = pyglet.window.Window(fullscreen='-fs' in ...
Python
#!/usr/bin/env python # # euclid graphics maths module # # Copyright (c) 2006 Alex Holkner # Alex.Holkner@mail.google.com # # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation; either version ...
Python
import math import pyglet from pyglet.gl import * class SmoothLineGroup(pyglet.graphics.Group): def set_state(self): glPushAttrib(GL_ENABLE_BIT) glEnable(GL_BLEND) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) glEnable(GL_LINE_SMOOTH) glLineWidth(2) def unset_state...
Python
''' Code by Richard Jones, released into the public domain. Inspired by http://screamyguy.net/lines/index.htm This code uses a single drawing buffer so that successive drawing passes may be used to create the line fading effect. The fading is achieved by drawing a translucent black quad over the entire scene before d...
Python
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: obj_test.py 111 2006-10-20 06:39:12Z r1chardj0n3s $' import sys import os import ctypes import pyglet from pyglet.gl import * from model import obj, geometric w = pyglet.window.Window() fourfv = ctypes.c_float * 4 glLightfv(GL_LI...
Python
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: gl_tree_test.py 114 2006-10-22 09:46:11Z r1chardj0n3s $' import math import random from pyglet.window import * from pyglet.window import mouse from pyglet import clock from ctypes import * from pyglet.window.event import * from pygl...
Python
import os import warnings from pyglet.gl import * from pyglet import image class Material(object): diffuse = [.8, .8, .8] ambient = [.2, .2, .2] specular = [0., 0., 0.] emission = [0., 0., 0.] shininess = 0. opacity = 1. texture = None def __init__(self, name): self.name = nam...
Python
import math import random from pyglet.gl import * import euclid M_2PI = math.pi * 2.0 class DisplayList(int): def draw(self): glCallList(self) def _TRI((v1, n1, t1, b1), (v2, n2, t2, b2), (v3, n3, t3, b3)): glNormal3f(n1[0], n1[1], n1[2]); glVertex3f(v1[0], v1[1], v1[2]) glNormal3f(n2[0], n2[1],...
Python
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: //depot/task/DEV-99/client/tests.py#13 $' import sys sys.path.insert(0, '../../') sys.path.insert(0, '../layout/') from pyglet.window import * from pyglet import clock from pyglet.gl import * from pyglet import media import layout...
Python
import os from pyglet import image _data = {} filename = os.path.join dirname = os.path.dirname(__file__) def load_gui_image(filename): if not os.path.isabs(filename): filename = os.path.join(dirname, 'data', filename) return load_image(filename) def load_image(*filename): filename = os.path.jo...
Python
'''Clipboard implementation for OS X using Win32 Based on implementation from: http://aspn.activestate.com/ASPN/Mail/Message/ctypes-users/1771866 ''' from ctypes import * from pyglet.window.win32.constants import CF_TEXT, GHND OpenClipboard = windll.user32.OpenClipboard EmptyClipboard = windll.user32.EmptyClipboard ...
Python
'''Clipboard implementation for X11 using xlib. ''' from ctypes import * from pyglet import window from pyglet.window.xlib import xlib XA_PRIMARY = xlib.Atom(1) XA_STRING = xlib.Atom(31) CurrentTime = 0 AnyPropertyType = 0 class XlibClipboard(object): def get_text(self): display = window.get_platform().g...
Python
'''Clipboard implementation for OS X using Carbon Based on information from: http://developer.apple.com/carbon/pasteboards.html ''' import sys from ctypes import * import pyglet.lib from pyglet.window.carbon import _create_cfstring, carbon, _oscheck from pyglet.window.carbon.constants import * from pyglet.window.c...
Python
'''Interaction with the Operating System text clipboard ''' import sys def get_text(): '''Get a string from the clipboard. ''' return _clipboard.get_text() def put_text(text): '''Put the string onto the clipboard. ''' return _clipboard.put_text(text) # Try to determine which platform to use....
Python
import sys import xml.sax.saxutils from pyglet.gl import * from pyglet.window import mouse, key from wydget import event, layouts, loadxml from wydget.widgets.frame import Frame from wydget.widgets.label import Label class MenuItem(Label): name = 'menu-item' @event.default('menu-item') def on_element_enter(item...
Python
import xml.sax.saxutils from pyglet.window import mouse, key from pyglet.gl import * from wydget import element, event, layouts, loadxml, util, data from wydget.widgets.frame import Frame from wydget.widgets.button import TextButton, Button from wydget.widgets.label import Label, Image class SelectionCommon(Frame): ...
Python
from wydget import anim from wydget.widgets.frame import Frame class Drawer(Frame): '''A *transparent container* that may hide and expose its contents. ''' name='drawer' HIDDEN='hidden' EXPOSED='exposed' LEFT='left' RIGHT='right' TOP='top' BOTTOM='bottom' def __init__(self, pa...
Python
from pyglet.gl import * from pyglet import clock from pyglet.window import mouse from wydget import element, event, data, util, anim from wydget.widgets.button import Button, RepeaterButton from wydget.widgets.label import Label from wydget.widgets.frame import Frame class SliderCommon(Frame): slider_size = 16 ...
Python
import xml.sax.saxutils from pyglet.gl import * from pyglet import clock from pyglet.window import key, mouse from wydget import element, event, util, anim, data, loadxml from wydget.widgets.label import ImageCommon, Label class ButtonCommon(object): is_focusable = True is_pressed = False is_over = Fals...
Python
from pyglet.gl import * from pyglet.window import mouse from pyglet import media, clock from wydget import element, event, util, data, layouts, anim from wydget.widgets.frame import Frame from wydget.widgets.label import Image, Label from wydget.widgets.button import Button class Movie(Frame): name='movie' de...
Python
import operator import xml.sax.saxutils from xml.etree import ElementTree from pyglet.gl import * import pyglet.image from wydget import element, event, loadxml, util, data, style TOP = 'top' BOTTOM = 'bottom' LEFT = 'left' RIGHT = 'right' CENTER = 'center' class ImageCommon(element.Element): image = None bl...
Python
from pyglet.gl import * from pyglet import clock from pyglet.window import key, mouse from wydget import element, event, util, anim, data class Checkbox(element.Element): name='checkbox' is_focusable = True def __init__(self, parent, value=False, width=16, height=16, **kw): self.parent = parent ...
Python
from wydget.widgets.button import Button, TextButton, RepeaterButton from wydget.widgets.frame import Frame, TabbedFrame from wydget.widgets.drawer import Drawer from wydget.widgets.label import Image, Label, XHTML from wydget.widgets.menu import MenuItem, PopupMenu from wydget.widgets.movie import Movie from wydget.wi...
Python
import sys import string from pyglet.gl import * from pyglet.window import key, mouse from wydget import event, anim, util, element from wydget.widgets.frame import Frame from wydget.widgets.label import Label from wydget import clipboard # for detecting words later letters = set(string.letters) class Cursor(elemen...
Python
import datetime import xml.sax.saxutils from pyglet.gl import * from wydget import element, event, layouts, loadxml, util from wydget.widgets.frame import Frame, ContainerFrame from wydget.widgets.slider import VerticalSlider, HorizontalSlider from wydget.widgets.label import Label class Table(element.Element): ...
Python
import os from pyglet.gl import * from pyglet.window import mouse from pyglet import media, clock from wydget import element, event, util, data, layouts from wydget.widgets.frame import Frame from wydget.widgets.label import Image, Label from wydget.widgets.button import Button class Music(Frame): name='music' ...
Python
from pyglet.gl import * from wydget import element, event, layouts, util, loadxml from wydget.widgets.label import Label, Image class FrameCommon(element.Element): need_layout = True def setDirty(self): super(FrameCommon, self).setDirty() self.need_layout = True def intrinsic_width(self):...
Python
from pyglet.gl import * from wydget import loadxml from wydget import util from wydget.widgets.label import Label class Progress(Label): name = 'progress' def __init__(self, parent, value=0.0, show_value=True, bar_color='gray', bgcolor=(.3, .3, .3, 1), color='white', width=None, height...
Python
'''Implement event handling for wydget GUIs. The `GUIEventDispatcher` class is automatically mixed into the `wydget.GUI` class and is activated by pushing the gui onto a window's event handlers stack:: gui = GUI(window) window.push_handlers(gui) Events ------ Standard pyglet events are passed through if ha...
Python
from pyglet.window import mouse import event def DragHandler(rule, buttons=mouse.LEFT): class _DragHandler(object): original_position = None mouse_buttons = buttons @event.select(rule) def on_drag(self, widget, x, y, dx, dy, buttons, modifiers): if not buttons & self....
Python
import math class RestartLayout(Exception): '''During layout an element has mutated the scene (eg. through adding scrollbars) and thus layout must be restarted). ''' def parse_value(value, base_value=0): '''Parse a numeric value spec which is one of: NNN integer NN.MMM float ...
Python
import os, sys from wydget import event, widgets, layouts from wydget.dialogs import base if sys.platform == 'darwin': default_dir = os.path.expanduser('~/Desktop') elif sys.platform in ('win32', 'cygwin'): default_dir = 'c:/' else: default_dir = os.path.expanduser('~/Desktop') class FileOpen(base.Dialog...
Python
from wydget import event from wydget import widgets from wydget import layouts from wydget.dialogs import base class Question(base.Dialog): id = '-question-dialog' name = 'question-dialog' classes = ('dialog', ) def __init__(self, parent, text, callback=None, cancel=True, font_size=None, p...
Python
from wydget import widgets, event class Dialog(widgets.Frame): def __init__(self, parent, x=0, y=0, z=0, width=None, height=None, classes=(), border='black', bgcolor='white', padding=2, **kw): if 'dialog' not in classes: classes = ('dialog', ) + classes super(Dialog, self)....
Python
from wydget.dialogs.question import Question, Message from wydget.dialogs.file import FileOpen
Python
import operator import math from wydget import util from wydget.widgets.label import Label TOP = 'top' BOTTOM = 'bottom' LEFT = 'left' RIGHT = 'right' CENTER = 'center' FILL = 'fill' intceil = lambda i: int(math.ceil(i)) class Layout(object): '''Absolute positioning layout -- also base class for other layouts. ...
Python
'''Define the core `Element` class from which all gui widgets are derived. All gui elements have: - the parent widget - an id, element name and list of classes - a list of children widgets - a position in 3D space, relative to their parent's position - dimensions available as width, height, rect and inner_rect - scal...
Python
import math from pyglet import clock linear = lambda t: t cosine90 = lambda t: 1-math.cos(t * math.pi/2) cosine180 = lambda t: 1-abs(math.cos(t * math.pi)) exponential = lambda t: (math.exp(t)-1) / (math.exp(1)-1) half_parabola = lambda t: (1000*t)**2 / 1000**2 inverted_half_parabola = lambda t: 1-((1000*t)**2 / 1000...
Python
from xml.etree import ElementTree class XMLLoadError(Exception): pass xml_registry = {} def fromFile(parent, file): '''Load a gui frame and any child elements from the XML file. The elements will be added as children on "parent" which may be any other widget or a GUI instance. ''' try: ...
Python
'''wydget is a graphical user interface (GUI) toolkit for pyglet. This module allows applications to create a user interface comprised of widgets and attach event handling to those widgets. GUIs are managed by the top-level GUI class:: from pyglet.window import Window from wydget import GUI window = Win...
Python
from pyglet.gl import * from pyglet import font from layout import * import util class Style(object): font_name = '' font_size = 14 def getFont(self, name=None, size=None): if name is None: name = self.font_name if size is None: size = self.font_size return font.load(name, size)...
Python
'''Usage: %s <arguments> -h h draw hexes with given height in a rectangular grid -x h draw hexes with given height in a hex grid -r w[,h] draw a rect grid -s w,h map size in cells (default=5,5) -f render flat (default) -o render orthographic projection -...
Python
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import os import shutil import sys import time from xml.dom.minidom import parse try: from xml.etree import ElementTree except ImportError: from elementtree import ElementTree def get_elem_by_id(doc, name, id): for el...
Python
#!/usr/bin/env python '''Generate PDF documentation Requires docutils, docbook XSL stylesheets, xsltproc and Apache FOP (with Batik). ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import os import shutil import subprocess from xml.dom.minidom import parse from docutils.core import publish_doctree, pu...
Python
# epydoc -- Backwards compatibility # # Copyright (C) 2005 Edward Loper # Author: Edward Loper <edloper@loper.org> # URL: <http://epydoc.sf.net> # # $Id: util.py 956 2006-03-10 01:30:51Z edloper $ """ Backwards compatibility with previous versions of Python. This module provides backwards compatibility by defining se...
Python
# # objdoc: epydoc documentation completeness checker # Edward Loper # # Created [01/30/01 05:18 PM] # $Id: checker.py 1366 2006-09-07 15:54:59Z edloper $ # """ Documentation completeness checker. This module defines a single class, C{DocChecker}, which can be used to check the that specified classes of objects are d...
Python
# epydoc -- Source code parsing # # Copyright (C) 2005 Edward Loper # Author: Edward Loper <edloper@loper.org> # URL: <http://epydoc.sf.net> # # $Id: docparser.py 1511 2007-02-16 02:08:51Z dvarrazzo $ """ Extract API documentation about python objects by parsing their source code. The function L{parse_docs()}, which ...
Python
# epydoc -- API Documentation Classes # # Copyright (C) 2005 Edward Loper # Author: Edward Loper <edloper@loper.org> # URL: <http://epydoc.sf.net> # # $Id: apidoc.py 1553 2007-02-27 00:07:56Z edloper $ """ Classes for encoding API documentation about Python programs. These classes are used as a common representation f...
Python
# epydoc -- Logging # # Copyright (C) 2005 Edward Loper # Author: Edward Loper <edloper@loper.org> # URL: <http://epydoc.sf.net> # # $Id: log.py 1488 2007-02-14 00:34:27Z edloper $ """ Functions used to report messages and progress updates to the user. These functions are delegated to zero or more registered L{Logger}...
Python
# # epydoc.py: epydoc LaTeX output generator # Edward Loper # # Created [01/30/01 05:18 PM] # $Id: latex.py 1479 2007-02-13 22:01:15Z edloper $ # """ The LaTeX output generator for epydoc. The main interface provided by this module is the L{LatexWriter} class. @todo: Inheritance=listed """ __docformat__ = 'epytext e...
Python
# epydoc -- Graph generation # # Copyright (C) 2005 Edward Loper # Author: Edward Loper <edloper@loper.org> # URL: <http://epydoc.sf.net> # # $Id: dotgraph.py 1510 2007-02-16 01:28:57Z dvarrazzo $ """ Render Graphviz directed graphs as images. Below are some examples. .. importgraph:: .. classtree:: epydoc.apidoc.A...
Python
# # epydoc.html: HTML colorizers # Edward Loper # # Created [10/16/02 09:49 PM] # $Id: html_colorize.py 1477 2007-02-13 20:27:31Z edloper $ # """ Functions to produce colorized HTML code for various objects. Currently, C{html_colorize} defines functions to colorize Python source code. """ __docformat__ = 'epytext en' ...
Python
# # epydoc.css: default epydoc CSS stylesheets # Edward Loper # # Created [01/30/01 05:18 PM] # $Id: html_css.py 1517 2007-02-16 06:13:56Z edloper $ # """ Predefined CSS stylesheets for the HTML outputter (L{epydoc.docwriter.html}). @type STYLESHEETS: C{dictionary} from C{string} to C{(string, string)} @var STYLESHEE...
Python
# # epydoc -- HTML output generator # Edward Loper # # Created [01/30/01 05:18 PM] # $Id: html.py 1550 2007-02-25 14:35:15Z dvarrazzo $ # """ The HTML output generator for epydoc. The main interface provided by this module is the L{HTMLWriter} class. @todo: Add a cache to L{HTMLWriter.url()}? """ __docformat__ = 'ep...
Python
# # epydoc.css: default help page # Edward Loper # # Created [01/30/01 05:18 PM] # $Id: html_help.py 1239 2006-07-05 11:29:50Z edloper $ # """ Default help file for the HTML outputter (L{epydoc.docwriter.html}). @type HTML_HELP: C{string} @var HTML_HELP: The contents of the HTML body for the default help page. """ __...
Python
# epydoc -- Plaintext output generation # # Copyright (C) 2005 Edward Loper # Author: Edward Loper <edloper@loper.org> # URL: <http://epydoc.sf.net> # # $Id: plaintext.py 1473 2007-02-13 19:46:05Z edloper $ """ Plaintext output generation. """ __docformat__ = 'epytext en' from epydoc.apidoc import * import re class ...
Python
# epydoc -- Output generation # # Copyright (C) 2005 Edward Loper # Author: Edward Loper <edloper@loper.org> # URL: <http://epydoc.sf.net> # # $Id: __init__.py 956 2006-03-10 01:30:51Z edloper $ """ Output generation. """ __docformat__ = 'epytext en'
Python
""" A Docutils_ interpreted text role for cross-API reference support. This module allows a Docutils_ document to refer to elements defined in external API documentation. It is possible to refer to many external API from the same document. Each API documentation is assigned a new interpreted text role: using such int...
Python
# epydoc -- Docstring processing # # Copyright (C) 2005 Edward Loper # Author: Edward Loper <edloper@loper.org> # URL: <http://epydoc.sf.net> # # $Id: docstringparser.py 1529 2007-02-18 12:34:08Z dvarrazzo $ """ Parse docstrings and handle any fields it defines, such as C{@type} and C{@author}. Fields are used to des...
Python
# epydoc -- Documentation Builder # # Copyright (C) 2005 Edward Loper # Author: Edward Loper <edloper@loper.org> # URL: <http://epydoc.sf.net> # # $Id: docbuilder.py 1545 2007-02-20 19:34:01Z edloper $ """ Construct data structures that encode the API documentation for Python objects. These data structures are create...
Python
# epydoc -- Utility functions # # Copyright (C) 2005 Edward Loper # Author: Edward Loper <edloper@loper.org> # URL: <http://epydoc.sf.net> # # $Id: util.py 1431 2007-02-04 02:57:23Z dvarrazzo $ """ Miscellaneous utility functions that are used by multiple modules. @group Python source types: is_module_file, is_packag...
Python
#!/usr/bin/env python # # objdoc: epydoc command-line interface # Edward Loper # # Created [03/15/02 10:31 PM] # $Id: gui.py 646 2004-03-19 19:01:37Z edloper $ # """ Graphical interface to epydoc. This interface might be useful for systems where it's inconvenient to use the command-line interface (such as Windows). ...
Python
# # epytext.py: epydoc formatted docstring parsing # Edward Loper # # Created [04/10/01 12:00 AM] # $Id: epytext.py 1552 2007-02-26 23:12:41Z edloper $ # """ Parser for epytext strings. Epytext is a lightweight markup whose primary intended application is Python documentation strings. This parser converts Epytext st...
Python
# # doctest.py: Syntax Highlighting for doctest blocks # Edward Loper # # Created [06/28/03 02:52 AM] # $Id: restructuredtext.py 1210 2006-04-10 13:25:50Z edloper $ # """ Syntax highlighting for doctest blocks. This module defines two functions, L{doctest_to_html()} and L{doctest_to_latex()}, which can be used to per...
Python
# # rst.py: ReStructuredText docstring parsing # Edward Loper # # Created [06/28/03 02:52 AM] # $Id: restructuredtext.py 1551 2007-02-25 16:13:17Z dvarrazzo $ # """ Epydoc parser for ReStructuredText strings. ReStructuredText is the standard markup language used by the Docutils project. L{parse_docstring()} provides ...
Python
# # javadoc.py: javadoc docstring parsing # Edward Loper # # Created [07/03/03 12:37 PM] # $Id: javadoc.py 1444 2007-02-10 19:26:54Z dvarrazzo $ # """ Epydoc parser for U{Javadoc<http://java.sun.com/j2se/javadoc/>} docstrings. Javadoc is an HTML-based markup language that was developed for documenting Java APIs with ...
Python
# epydoc -- Marked-up Representations for Python Values # # Copyright (C) 2005 Edward Loper # Author: Edward Loper <edloper@loper.org> # URL: <http://epydoc.sf.net> # # $Id: apidoc.py 1448 2007-02-11 00:05:34Z dvarrazzo $ """ Syntax highlighter for Python values. Currently provides special colorization support for: ...
Python
# # plaintext.py: plaintext docstring parsing # Edward Loper # # Created [04/10/01 12:00 AM] # $Id: plaintext.py 1444 2007-02-10 19:26:54Z dvarrazzo $ # """ Parser for plaintext docstrings. Plaintext docstrings are rendered as verbatim output, preserving all whitespace. """ __docformat__ = 'epytext en' from epydoc.m...
Python
# # epydoc package file # # A python documentation Module # Edward Loper # # $Id: __init__.py 1444 2007-02-10 19:26:54Z dvarrazzo $ # """ Markup language support for docstrings. Each submodule defines a parser for a single markup language. These parsers convert an object's docstring to a L{ParsedDocstring}, a standa...
Python
# epydoc # # Copyright (C) 2005 Edward Loper # Author: Edward Loper <edloper@loper.org> # URL: <http://epydoc.sf.net> # # $Id: __init__.py 1558 2007-02-27 05:28:35Z edloper $ """ Automatic Python reference documentation generator. Epydoc processes Python modules and docstrings to generate formatted API documentation,...
Python
# epydoc -- Introspection # # Copyright (C) 2005 Edward Loper # Author: Edward Loper <edloper@loper.org> # URL: <http://epydoc.sf.net> # # $Id: docintrospecter.py 1501 2007-02-14 08:36:59Z edloper $ """ Extract API documentation about python objects by directly introspecting their values. The function L{introspect_do...
Python
# epydoc -- Command line interface # # Copyright (C) 2005 Edward Loper # Author: Edward Loper <edloper@loper.org> # URL: <http://epydoc.sf.net> # # $Id: cli.py 1549 2007-02-24 16:23:49Z dvarrazzo $ """ Command-line interface for epydoc. Abbreviated Usage:: epydoc [options] NAMES... NAMES... ...
Python
# # epydoc -- Utility functions used by regression tests (*.doctest) # Edward Loper # # Created [01/30/01 05:18 PM] # $Id: html.py 1420 2007-01-28 14:19:30Z dvarrazzo $ # """ Utility functions used by the regression tests (C{*.doctest}). """ __docformat__ = 'epytext en' import tempfile, re, os, os.path, textwrap, sys...
Python