OpenGLContext.loaders.loader
index
/home/mcfletch/pylive/OpenGLContext/loaders/loader.py

Load-manager for downloading multi-value URLs
 
The Singleton "Loader" should be used for most interactions.

 
Modules
       
logging
os
urllib

 
Classes
       
object
_Loader

 
class _Loader(object)
    (Singleton) Manager for downloading resources
 
Is a generic class which provides download services
which follow VRML97 semantics (multiple-URL definitions,
with chaining to the first successful URL).
 
The loader will attempt to use a local cache of files
to prevent multiple downloading.
 
  Methods defined here:
__call__(self, url, baseURL=None)
Load the given multi-value url and call callbacks
 
url -- vrml97-style url (multi-value string)
baseURL -- optional base url from which items in url will
    be resolved.  protofunctions.root(node).baseURI will
    give you the baseURL normally used for the given node.
 
raises IOError on failure
returns (successfulURL, filename, open_file, headers) on success
 
headers will be None for local files
__init__(self)
Initialize the Loader
download(self, url)
Download the given url to local disk, return local filename
findHandler(self, url)
Find registered handler for the url's apparent suffix
 
TODO: allow for content-type operations after downloading the URL
get(self, url)
Retrieve the given single-value URL
 
url -- single-value URL, which may be a local filename
    or any URL type supported by urllib
 
returns (baseURL, file, filename, headers)
load(self, url, baseURL=None)
Load the given URL as a scenegraph
 
url -- the URL (or list of URLs) from which to load
baseURL -- optional base URL from which to determine
    relative URL values
loadHandlers(self)
Load all registered handlers
loads(self, data, baseURL='resource.wrl')
Load given raw data as a scenegraph
 
baseURL -- base URL from which to determine
    relative URL values

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:
loadedHandlers = {'.obj': <OpenGLContext.loaders.obj.OBJHandler object>, '.vrml': <OpenGLContext.loaders.vrml97.VRML97Handler object>, '.wrl': <OpenGLContext.loaders.vrml97.VRML97Handler object>, '.wrl.gz': <OpenGLContext.loaders.vrml97.VRML97Handler object>, '.wrz': <OpenGLContext.loaders.vrml97.VRML97Handler object>, 'model/vrml': <OpenGLContext.loaders.vrml97.VRML97Handler object>, 'x-world/x-vrml': <OpenGLContext.loaders.vrml97.VRML97Handler object>}

 
Functions
       
StringIO(...)
StringIO([s]) -- Return a StringIO-like stream for reading or writing

 
Data
        Loader = <OpenGLContext.loaders.loader._Loader object>
__file__ = '/home/mcfletch/pylive/OpenGLContext/loaders/loader.pyc'
__name__ = 'OpenGLContext.loaders.loader'
__package__ = 'OpenGLContext.loaders'
log = <logging.Logger object>