Help on package yotsuba: NAME yotsuba FILE /usr/local/lib/python2.6/dist-packages/yotsuba-2.3-py2.6.egg/yotsuba/__init__.py DESCRIPTION # Yotsuba 2.0 (Stable) # Project Yotsuba # (C) 2007 Juti Noppornpitak # License: GNU Lesser General Public License and MIT License PACKAGE CONTENTS CLASSES __builtin__.object DOMElement MailPackage Postman XML XMLQueriedNodes Cryptographer FileSystemInterface SystemLog class Cryptographer | Methods defined here: | | decrypt(self, text) | | deserialise(self, serialisedData) | | encrypt(self, text) | | hash(self, text, hashPackage=None) | | serialise(self, dataObject) | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | cryptographicDepthLevel = 10 class DOMElement(__builtin__.object) | Methods defined here: | | __init__(self, element, parent=None, level=0, levelIndex=0) | | __str__(self) | | attr(self, attrName) | | child(self, indexNumber=None) | | data(self) | | get(self, selector) | | hasAttr(self, attrName) | | name(self) | | parent(self) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) class FileSystemInterface | Methods defined here: | | abspath(self, destpath, request_relative_path_fixed=False) | # Friendly Path Identifier | | browse(self, destpath, request_abspath_shown=False, filter=None, filterToSearch=False) | # Browsing Function | | checkType(self, destpath) | # Symbol-instance checker | | executable(self, destpath) | | exists(self, destpath) | | isdir(self, destpath) | | isfile(self, destpath) | | mkdir(self, destpath) | # Make directory | | read(self, filename='', mode='r') | # Reading Function | | readWeb(self, url) | # Web Data Fetching Function | | readable(self, destpath) | | remove(self, destpath) | # Removal Function | | size(self, destpath) | # Check the size of file or directory | | writable(self, destpath) | | write(self, filename, data, mode='w') | # Writing Function class MailPackage(__builtin__.object) | Message Holder | | Methods defined here: | | __init__(self, to, title, content, type='text/plain') | | compile(self) | | header(self, key, value=None) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | destination = None class Postman(__builtin__.object) | Mail sender | | Methods defined here: | | __init__(self, yourself, server='localhost', port=None, secure=False) | | addPackage(self, package) | | initialize(self, yourself, server='localhost', port=None, secure=False) | | login(self, username, password) | | send(self) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) class SystemLog | Methods defined here: | | export(self, level=-1, onlyOneLevel=False, toArray=False) | Export logs as a hash table | | report(self, content, level=0) | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | LogObject = | | codeWatchLevel = 3 | | errorLevel = 2 | | hasError = False | | logs = [] | | maxAllowedLevel = 2 | | noticeLevel = 0 | | warningLevel = 1 class XML(__builtin__.object) | XML parser using CSS3 selector. | | Normally, this package is already instantiated upon importing this library. | However, when the user instantiates an instance of this class, the internal | term here is "Standalone Mode" | | Methods defined here: | | __init__(self, source=None) | This package is a breakthrough of XML parsers in Python using | basic CSS3-selector method, instead of XPath. | | This is a prototype. | | buildTreeOnTheFly(self, node, parentNode=None, level=0, levelIndex=0) | Construct an XML tree for query. | This is not meant to be used directly. | | get(self, selector, useMultiThread=False, maxDepth=None) | Get elements according to the supplied combination of CSS-3 selectors. | This method is suitable for the standalone/default mode. | | isTheEndOfPathReached(self, selector, selectorLevel) | Check if the code walk to the end of the selector. | This is not meant to be used directly. | | makeSelectorObject(self, selectorObjectString) | Makes a selector object with a selector-object string (a tag name with or without attributes). | Returns a null object if the selectorObjectString is not well-formatted. | | A well-formatted selector objects should be in the following patterns. | - element | - element[attrName] | - element[attrName=attrValue] | - element[attrName^=attrValue] | - element[attrName$=attrValue] | - element[attrName~=attrValue] | - element[attrName*=attrValue] | - element[attrName|=attrValue] | - element[attrName1=attrValue1][attrName2=attrValue2]...[attrNameN=attrValueN] | - element[...]:filter1:filter2:...:filterN | | (Source: http://docs.jquery.com/Selectors) | (Source: http://www.w3.org/TR/css3-selectors/#selectors) | | query(self, treeName, selector, useMultiThread=False, maxDepth=None) | Query for elements according to the supplied combination of CSS-3 | selectors. This method is suitable if there are multiple trees within | one instance of XML. | | (Note: The goal is to support a value of treeName as an instance of self.node | and self.queryNodes. The support on self.node is not quite working.) | | queryWithOneSelector(self, selectorReference, startupNode, query, useMultiThread=False, maxDepth=None) | Query for elements by a single combination of CSS-3 selectors. This is | not meant to be used directly. Please use query(...) instead. | | read(self, *params) | Read and parse either a XML-formatted string or a XML document file and | store for querying. | | traverse(self, node, selector, selectorLevel=0, poleNode=None, singleSiblingSearch=False, maxDepth=None) | Performs querying at the low level on the tree. This function is | different from query() that it's querying based on each position. | The speed complexity is O(n) where n is the number of nodes. | | Please notes that this function treats the parameter node as the | root of a subtree of its origin. | | See http://doc.shiroyuki.com/lib/Yotsuba_SDK_XML_Package#def_traverse.28node.2C_selector.2C_selectorLevel.2C_poleNode.2C_singleSiblingSearch.29 | for the description of parameters | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | defaultTreeName = 'defaultTree' | | rule_adjacentSiblingCombinator = '+' | | rule_childCombinator = '>' | | rule_descendantCombinator = ' ' | | rule_generalSiblingCombinator = '~' | | selectorObject = | | | specialRules = ['>', '+', '~'] class XMLQueriedNodes(__builtin__.object) | Methods defined here: | | __init__(self, elements=[]) | | data(self) | | eq(self, indexNumber) | | get(self, selector) | | length(self) | | list(self) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) DATA DEFAULT_CONTENT_TYPE = 'text/html;charset=UTF-8' DEFAULT_PATH_TO_SESSION_STORAGE = 'sessions/' DIRECTORY = 1 FILE = 0 LINK = 2 PROJECT_CODENAME = 'Kotoba' PROJECT_MAJOR_VERSION = 2 PROJECT_MINOR_VERSION = 3 PROJECT_SIGNATURE = 'Yotsuba/Kotoba 2.3 (Stable)' PROJECT_STATUS = 'Stable' PROJECT_TITLE = 'Yotsuba' PROJECT_VERSION = '2.3 (Stable)' READ_BINARY = 'rb' READ_NORMAL = 'r' READ_PICKLE = 'pickle::read' WRITE_BINARY = 'wb' WRITE_NORMAL = 'w' WRITE_PICKLE = 'pickle::write' crypt = fs = kotoba = syslog =