code
stringlengths
1
1.72M
language
stringclasses
1 value
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gn...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gn...
Python
""" FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html...
Python
ImageAnalysis: 1.1.3
Python
import sys from time import gmtime year, mon, mday, hour, min, sec, wday, yday, isdst = gmtime() bld = ((year - 2000) * 12 + mon - 1) * 100 + mday rev = hour * 100 + min print 'Your build and revision number for today is %d.%d.' % (bld, rev)
Python
''' Created on 2009-6-12 @author: roamer ''' import analysis.Statistics import codeprocess.ParseCode import analysis.Params import analysis.Setting import os if __name__ == "__main__": a = analysis.Statistics.Statistics() a.StatisticsFiles() a.SaveResult() b = analysis.Statistics.BaseP...
Python
''' Created on 2009-6-12 @author: roamer ''' import mainprocess.MainProcess if __name__ == "__main__": #a = mainprocess.MainProcess.MainProcess("H,bd1,U,b90,H,2l0,2l0,5b0,o50") #a = mainprocess.MainProcess.MainProcess("H,J,ig0,2l0,kf0") #a = mainprocess.MainProcess.MainProcess("K,kt0,670,2n0") #...
Python
''' Created on 2009-6-13 @author: roamer ''' from codeprocess import * from analysis import * import Util import Image,os class MainProcess(object): def __init__(self,code): self.__parser = ParseCode.ParseCode(code) words = Statistics.Statistics().RestoreResult() bases = Stat...
Python
''' Created on 2009-6-19 @author: roamer ''' class Util: @staticmethod def Combination(items, n=None): if n is None: n = len(items) for i in range(len(items)): v = items[i:i+1] if n == 1: yield v else: ...
Python
''' Created on 2009-6-12 @author: roamer ''' __all__ = ['Util','MainProcess']
Python
''' Created on 2009-6-12 @author: roamer ''' import Image import os from Setting import * from ValueStore import * class Statistics: def __init__(self): self.__result = [] def __processOneImg(self,file): black_count = 0; x_sum = 0; y_sum = 0; img = Image.open(file...
Python
''' Created on 2009-6-12 @author: roamer ''' import os import shelve from Setting import * from ValueStore import * class Params: def __init__(self): self.__fileData = {} def ReadFile(self): file = open(Setting['ParamFile']) for line in file.readlines(): ...
Python
''' Created on 2009-6-12 @author: roamer ''' __all__ = ['Statistics','Params','Setting','ValueStore']
Python
''' Created on 2009-6-12 @author: roamer ''' import os Setting = { "DbFile" : os.sep.join(["..","data","result","mydb.db"]), "ParamFile" : os.sep.join(['..','data','rawdata','param.txt']), "ImgFolder" : os.sep.join(["..","data","images"]), "ImgKey" : "ImgKey", ...
Python
''' Created on 2009-6-12 @author: roamer ''' import shelve from Setting import * class ValueStore: @staticmethod def Read(key): vals = shelve.open(Setting['DbFile'],"r") val = vals[key] vals.close() return val @staticmethod def Save(key,val): ...
Python
''' Created on 2009-6-12 @author: roamer ''' import re _Dic_StructParams = { 'H':((0.0,0.8,0.0,1.0),(0.2,1.0,0.0,1.0)), 'J':((0.0,1.0,0.0,0.8),(0.0,1.0,0.2,1.0)), 'L':((0.0,1.0,0.0,1.0),(0.1,0.9,0.1,0.9)), 'G':((0.0,1.0,0.0,1.0),), ...
Python
''' Created on 2009-6-12 @author: roamer ''' __all__ = ["ParseCode"]
Python
income = 0.00 alg1 = 0.00 alg2 = 0.00 ausgaben = dict() print('### FINANZPLANER ###\n') income = float(input('Monatsgehalt: ')) # DEBUG #print(type(income)) # DEBUG END print("Dein Monatgehalt beträgt " + str(income) + ' €') print("Nachfolgend werden deine monatlichen Ausgaben erfragt\n") weiter = 1 while(weiter =...
Python
#!/usr/bin/python # -*- coding: utf-8 -*- # # find-delete # Copyright (C) 2010 Elton Pereira <eltonplima@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of...
Python
"""Author: Sean McKiernan (Mekire) Purpose: Exploring A* pathfinding. License: Free for everyone and anything (no warranty expressed or implied) Module: main.py Overview: Primary driver for entire program. Classes: Control(object): Methods: __init__(self) event_loop(self) ...
Python
"""Module: solver.py Overview: Contains the astar algorithm itself which can be used completely independent of the rest of the program. Gobal Constants: ADJACENTS HEURISTICS Functions: rook(x,y) queen(x,y) knight(x,y) Classes: Star(object): Methods: __init__(self) ...
Python
"""Module: interface.py Overview: The core of the GUI for the A* demo. Classes: Interface(object): Methods: __init__(self) make_background(self) reset(self,full=True) setup_barriers(self) render_text(self,specific=None) get_target(self)...
Python
''' This file handles all the request related to fabric operation ''' import os from google.appengine.ext import db from google.appengine.api import users from google.appengine.ext.db import djangoforms import django from django import http from util import respond from form import FabricTypeForm fro...
Python
# Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License atROOT_URLCONF # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
Python
from google.appengine.ext.db import djangoforms #local import from dao import * class UserForm(djangoforms.ModelForm): class Meta: model = LocalUsers exclude = ['joinDate'] class FabricTypeForm(djangoforms.ModelForm): class Meta: model = FabricType exclude = ['addDate'] class ...
Python
# Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
''' This file handles all the request from index page ''' import os from google.appengine.api import users from util import * def index(request): user = users.GetCurrentUser() return respond(request, user, 'index', None) def nav(request): user = users.GetCurrentUser() return respond(request, ...
Python
''' This file handles all the request related to in and out operation ''' import os from google.appengine.ext import db from google.appengine.api import users from google.appengine.ext.db import djangoforms import django from django import http #local import from form import StatisticForm from util i...
Python
''' This file handles all the request related to user operation ''' import os from google.appengine.ext import db from google.appengine.api import users from google.appengine.ext.db import djangoforms import django from django import http #local import from form import UserForm from util import respond from dao imp...
Python
import os import django from django import shortcuts from google.appengine.api import users def respond(request, user, template, params=None): """Helper to render a response, passing standard stuff to the response. Args: request: The request object. user: The User object representing the cur...
Python
# Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
from google.appengine.ext import db class LocalUsers(db.Model): displayName = db.StringProperty(required = True) user = db.UserProperty() isAuthorized = db.BooleanProperty() joinDate = db.DateProperty(auto_now_add = True) class FabricType(db.Model): localUser = db.ReferenceProperty(Loca...
Python
# fill this with data from os.urandom(64) COOKIE_KEY = '' FACEBOOK_KEY = '' FACEBOOK_SECRET = '' # to enable, set to analytics id: 'UA-12345678-9' GOOGLE_ANALYTICS = '' TWITTER_KEY = 'pCUVbTMmjUgFdUte2OpKw' TWITTER_SECRET = '2ZkmX9uZXViXRTvHulBMTBo7XFpSygyyxAWRKUz0' DROPBOX_KEY = '' DROPBOX_SECRET = '' GOOGLE_SITE...
Python
# Copyright (c) 2011 Matt Jibson <matt.jibson@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUT...
Python
# Copyright (c) 2011 Matt Jibson <matt.jibson@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUT...
Python
"""Tests for query.py.""" import datetime import os import unittest from .google_imports import datastore_errors from .google_imports import users from .google_test_imports import datastore_stub_util from . import model from . import query from . import tasklets from . import test_utils class QueryTests(test_utils...
Python
"""An event loop. This event loop should handle both asynchronous App Engine RPC objects (specifically urlfetch, memcache and datastore RPC objects) and arbitrary callback functions with an optional time delay. Normally, event loops are singleton objects, though there is no enforcement of this requirement. The API h...
Python
"""Low-level utilities used internally by NDB. These are not meant for use by code outside NDB. """ import logging import os import sys import threading __all__ = [] DEBUG = True # Set to False for some speedups def logging_debug(*args): # NOTE: If you want to see debug messages, set the logging level # manu...
Python
"""Like google_imports.py, but for use by tests. This imports the testbed package and some stubs. """ from . import google_imports if google_imports.normal_environment: from google.appengine.api.prospective_search import prospective_search_stub from google.appengine.datastore import datastore_stub_util from go...
Python
"""Tests for eventloop.py.""" import logging import os import time import unittest from .google_imports import apiproxy_stub_map from .google_imports import datastore_rpc from . import eventloop from . import test_utils class EventLoopTests(test_utils.NDBTest): def setUp(self): super(EventLoopTests, self).se...
Python
"""Tests for context.py.""" import logging import random import socket import threading import time import unittest from .google_imports import datastore_errors from .google_imports import memcache from .google_imports import taskqueue from .google_imports import datastore_rpc from .google_imports import apiproxy_err...
Python
"""A tasklet decorator. Tasklets are a way to write concurrently running functions without threads; tasklets are executed by an event loop and can suspend themselves blocking for I/O or some other operation using a yield statement. The notion of a blocking operation is abstracted into the Future class, but a tasklet ...
Python
"""Tests for polymodel.py. See issue 35. http://goo.gl/iHkCm """ import pickle import unittest from .google_imports import namespace_manager from .google_imports import datastore_types from . import polymodel from . import model from . import test_utils PolyModel = polymodel.PolyModel class PolyModelTests(test...
Python
"""Prospective Search for NDB. This reimplements all of the standard APIs with the following changes: - A document_class argument must be an NDB Model class. - A document must be an NDB Model instance. - get_document() always returns an NDB Model instance. The exceptions and public constants exported by the standard...
Python
"""Context class.""" import logging import sys from .google_imports import datastore # For taskqueue coordination from .google_imports import datastore_errors from .google_imports import memcache from .google_imports import namespace_manager from .google_imports import urlfetch from .google_imports import datastore_...
Python
"""Tests for stats.py.""" import datetime import os import unittest from .google_imports import datastore from . import stats from . import test_utils class StatsTests(test_utils.NDBTest): def setUp(self): """Setup test infrastructure.""" super(StatsTests, self).setUp() self.PopulateStatEntities() ...
Python
#!/usr/bin/env python # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwar...
Python
#!/usr/bin/env python # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwar...
Python
"""Polymorphic models and queries. The standard NDB Model class only supports 'functional polymorphism'. That is, you can create a subclass of Model, and then subclass that class, as many generations as necessary, and those classes will share all the same properties and behaviors of their base classes. However, subcl...
Python
"""Models to be used when accessing app specific datastore usage statistics. These entities cannot be created by users, but are populated in the application's datastore by offline processes run by the Google App Engine team. """ # NOTE: All constant strings in this file should be kept in sync with # those in google/a...
Python
"""Models and helper functions for access to app's datastore metadata. These entities cannot be created by users, but are created as results of __namespace__, __kind__ and __property__ metadata queries. A simplified API is also offered: ndb.metadata.get_namespaces(): A list of namespace names. ndb.metadata.get_k...
Python
"""Dynamically decide from where to import Google App Engine modules. All other NDB code should import its Google App Engine modules from this module. If necessary, add new imports here (in both places). """ try: from google.appengine import api normal_environment = True except ImportError: from google3.apphos...
Python
"""Higher-level Query wrapper. There are perhaps too many query APIs in the world. The fundamental API here overloads the 6 comparisons operators to represent filters on property values, and supports AND and OR operations (implemented as functions -- Python's 'and' and 'or' operators cannot be overloaded, and the '&'...
Python
"""Tests for tasklets.py.""" import os import random import re import sys import time import unittest from . import context from . import eventloop from . import model from . import test_utils from . import tasklets from . import utils class TaskletTests(test_utils.NDBTest): def setUp(self): super(TaskletTes...
Python
"""Tests for prospective_search.py.""" import base64 import os import unittest from .google_imports import apiproxy_stub_map from .google_test_imports import prospective_search_stub from . import prospective_search from . import model from . import test_utils class ProspectiveSearchTests(test_utils.NDBTest): d...
Python
"""Tests for model.py.""" import datetime import difflib import os import pickle import re import unittest from .google_imports import datastore_errors from .google_imports import datastore_types from .google_imports import db from .google_imports import memcache from .google_imports import namespace_manager from .go...
Python
"""NDB interface for Blobstore. This currently builds on google.appengine.ext.blobstore and provides a similar API. The main API differences: - BlobInfo is an actual Model subclass rather than a pseudo-model class. To query, use BlobInfo.query() and its documented properties. Other changes: - The kind is '__B...
Python
"""Tests for metadata.py.""" import unittest from .google_imports import namespace_manager from . import metadata from . import model from . import test_utils class MetadataTests(test_utils.NDBTest): def setUp(self): super(MetadataTests, self).setUp() class Foo(model.Model): name = model.StringPro...
Python
"""Some tests for datastore_rpc.py.""" import unittest from .google_imports import apiproxy_stub_map from .google_imports import datastore_rpc from . import model from . import test_utils class PendingTests(test_utils.NDBTest): """Tests for the 'pending RPC' management.""" def testBasicSetup1(self): ent =...
Python
"""The Key class, and associated utilities. A Key encapsulates the following pieces of information, which together uniquely designate a (possible) entity in the App Engine datastore: - an application id (a string) - a namespace (a string) - a list of one or more (kind, id) pairs where kind is a string and id is eit...
Python
"""Tests for key.py.""" import base64 import pickle import unittest from .google_imports import datastore_errors from .google_imports import datastore_types from .google_imports import entity_pb from . import eventloop from . import key from . import model from . import tasklets from . import test_utils class KeyT...
Python
"""NDB -- A new datastore API for the Google App Engine Python runtime.""" __version__ = '0.9.9' __all__ = [] from tasklets import * __all__ += tasklets.__all__ from model import * # This implies key.* __all__ += model.__all__ from query import * __all__ += query.__all__ from context import * __all__ += context....
Python
"""Tests for blobstore.py.""" import cgi import cStringIO import datetime import pickle import unittest from .google_imports import namespace_manager from .google_imports import datastore_types from . import blobstore from . import model from . import tasklets from . import test_utils class BlobstoreTests(test_uti...
Python
"""Model and Property classes and associated stuff. A model class represents the structure of entities stored in the datastore. Applications define model classes to indicate the structure of their entities, then instantiate those model classes to create entities. All model classes must inherit (directly or indirectl...
Python
"""Run all unittests.""" __author__ = 'Beech Horn' import sys import unittest try: import ndb location = 'ndb' except ImportError: import google3.third_party.apphosting.python.ndb location = 'google3.third_party.apphosting.python.ndb' def load_tests(): mods = ['context', 'eventloop', 'key', 'metadata', '...
Python
#!/usr/bin/python # # library for accessing a web service (API) with the OAuth protocol # (trying to make web service and web app server independent, not there yet) # # This library is a derivative of the tweetapp framework by tav@espians.com available at: # http://github.com/tav/tweetapp/tree/master # # Other credits ...
Python
# Copyright (c) 2011 Matt Jibson <matt.jibson@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUT...
Python
# Copyright (c) 2011 Matt Jibson <matt.jibson@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUT...
Python
# Copyright (c) 2011 Matt Jibson <matt.jibson@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUT...
Python
# Copyright (c) 2011 Matt Jibson <matt.jibson@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUT...
Python
#!/usr/bin/python # # library for accessing a web service (API) with the OAuth protocol # (trying to make web service and web app server independent, not there yet) # # This library is a derivative of the tweetapp framework by tav@espians.com available at: # http://github.com/tav/tweetapp/tree/master # # Other credits ...
Python
# Copyright (c) 2011 Matt Jibson <matt.jibson@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUT...
Python
# blobstore utf-8 issue patched from comment #21 at: http://code.google.com/p/googleappengine/issues/detail?id=2749 import base64 import quopri from webob import multidict def from_fieldstorage(cls, fs): """ Create a dict from a cgi.FieldStorage instance """ obj = cls() if fs.list: # fs....
Python
import os import sys sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'lib')) # see issue772: http://code.google.com/p/googleappengine/issues/detail?id=772 ultimate_sys_path = None def fix_sys_path(): global ultimate_sys_path if ultimate_sys_path is None: ultimate_sys_path = list(sys.path) ...
Python
# Copyright (c) 2011 Matt Jibson <matt.jibson@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUT...
Python
# adapted from http://code.google.com/appengine/articles/sharding_counters.html import random from google.appengine.api import memcache from google.appengine.ext import db COUNTER_CHARS = 'characters' COUNTER_ENTRIES = 'entries' COUNTER_JOURNALS = 'journals' COUNTER_SENTENCES = 'sentences' COUNTER_USERS = 'users' CO...
Python
""" The MIT License Copyright (c) 2007 Leah Culver Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publis...
Python
#!/usr/bin/env python """ PyTextile A Humane Web Text Generator """ __version__ = '2.1.3' __date__ = '2009/02/07' __copyright__ = """ Copyright (c) 2009, Jason Samsa, http://jsamsa.com/ Copyright (c) 2004, Roberto A. F. De Almeida, http://dealmeida.net/ Copyright (c) 2003, Mark Pilgrim, http://diveintomark.org/ Or...
Python
"""Convert to and from Roman numerals""" __author__ = "Mark Pilgrim (f8dy@diveintopython.org)" __version__ = "1.4" __date__ = "8 August 2001" __copyright__ = """Copyright (c) 2001 Mark Pilgrim This program is part of "Dive Into Python", a free Python tutorial for experienced programmers. Visit http://diveintopython....
Python
# $Id: nodes.py 6011 2009-07-09 10:00:07Z gbrandl $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Docutils document tree element class library. Classes in CamelCase are abstract base classes or auxiliary classes. The one exception is `Text`, for a text...
Python
# $Id: utils.py 6120 2009-09-10 11:02:27Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Miscellaneous utilities for the documentation utilities. """ __docformat__ = 'reStructuredText' import sys import os import os.path import warnings import ...
Python
# -*- coding: utf8 -*- # $Id: __init__.py 6156 2009-10-08 09:42:38Z milde $ # Author: Engelbert Gruber <grubert@users.sourceforge.net> # Copyright: This module has been placed in the public domain. """LaTeX2e document tree Writer.""" __docformat__ = 'reStructuredText' # code contributions from several people include...
Python
# -*- coding: utf-8 -*- # $Id: manpage.py 6110 2009-08-31 14:40:33Z grubert $ # Author: Engelbert Gruber <grubert@users.sourceforge.net> # Copyright: This module is put into the public domain. """ Simple man page writer for reStructuredText. Man pages (short for "manual pages") contain system documentation on unix-li...
Python
# $Id: __init__.py 5889 2009-04-01 20:00:21Z gbrandl $ # Authors: Chris Liechti <cliechti@gmx.net>; # David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ S5/HTML Slideshow Writer. """ __docformat__ = 'reStructuredText' import sys import os import re import ...
Python
# $Id: pygmentsformatter.py 5853 2009-01-19 21:02:02Z dkuhlman $ # Author: Dave Kuhlman <dkuhlman@rexx.com> # Copyright: This module has been placed in the public domain. """ Additional support for Pygments formatter. """ import pygments import pygments.formatter class OdtPygmentsFormatter(pygments.formatter.For...
Python
# $Id: __init__.py 6034 2009-07-20 18:46:51Z dkuhlman $ # Author: Dave Kuhlman <dkuhlman@rexx.com> # Copyright: This module has been placed in the public domain. """ Open Document Format (ODF) Writer. """ VERSION = '1.0a' __docformat__ = 'reStructuredText' import sys import os import os.path import tempfile impor...
Python
# $Id: __init__.py 6153 2009-10-05 13:37:10Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Simple HyperText Markup Language document tree Writer. The output conforms to the XHTML version 1.0 Transitional DTD (*almost* strict). The output conta...
Python
# $Id: null.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ A do-nothing Writer. """ from docutils import writers class Writer(writers.UnfilteredWriter): supported = ('null',) """Formats this writer suppo...
Python
# $Id$ # Author: Lea Wiemann <LeWiemann@gmail.com> # Copyright: This file has been placed in the public domain. # This is a mapping of Unicode characters to LaTeX equivalents. # The information has been extracted from # <http://www.w3.org/2003/entities/xml/unicode.xml>, written by # David Carlisle and Sebastian Rahtz....
Python
# $Id: __init__.py 5738 2008-11-30 08:59:04Z grubert $ # Author: Lea Wiemann <LeWiemann@gmail.com> # Copyright: This module has been placed in the public domain. """ LaTeX2e document tree Writer. """ # Thanks to Engelbert Gruber and various contributors for the original # LaTeX writer, some code and many ideas of whi...
Python
# $Id: __init__.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ PEP HTML Writer. """ __docformat__ = 'reStructuredText' import sys import os import os.path import codecs import docutils from docutils import fronte...
Python
# $Id: pseudoxml.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Simple internal document tree Writer, writes indented pseudo-XML. """ __docformat__ = 'reStructuredText' from docutils import writers class Writer...
Python
# $Id: __init__.py 6111 2009-09-02 21:36:05Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ This package contains Docutils Writer modules. """ __docformat__ = 'reStructuredText' import os.path import docutils from docutils import languages, Co...
Python
# $Id: docutils_xml.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Simple internal document tree Writer, writes Docutils XML. """ __docformat__ = 'reStructuredText' import docutils from docutils import frontend, ...
Python
# $Id: urischemes.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ `schemes` is a dictionary with lowercase URI addressing schemes as keys and descriptions as values. It was compiled from the index at http://www.iana....
Python
# $Id: examples.py 4800 2006-11-12 18:02:01Z goodger $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ This module contains practical examples of Docutils client code. Importing this module from client code is not recommended; its contents are subject to...
Python
#!/usr/bin/env python # -*- coding: utf8 -*- # string_template_compat.py: string.Template for Python <= 2.4 # ===================================================== # This is just an excerpt of the standard string module to provide backwards # compatibility. import re as _re class _multimap: """Helper class for ...
Python
#!/usr/bin/env python # -*- coding: utf8 -*- # string_template_compat.py: string.Template for Python <= 2.4 # ===================================================== # This is just an excerpt of the standard string module to provide backwards # compatibility. import re as _re class _multimap: """Helper class for ...
Python
# $Id: parts.py 6073 2009-08-06 12:21:10Z milde $ # Authors: David Goodger <goodger@python.org>; Ueli Schlaepfer; Dmitry Jemerov # Copyright: This module has been placed in the public domain. """ Transforms related to document parts. """ __docformat__ = 'reStructuredText' import re import sys from docutils import n...
Python
# $Id: universal.py 6112 2009-09-03 07:27:59Z milde $ # Authors: David Goodger <goodger@python.org>; Ueli Schlaepfer # Copyright: This module has been placed in the public domain. """ Transforms needed by most or all documents: - `Decorations`: Generate a document's header & footer. - `Messages`: Placement of system ...
Python