From: Mike Bayer Date: Thu, 27 Oct 2005 03:10:25 +0000 (+0000) Subject: (no commit message) X-Git-Tag: rel_0_1_0~444 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=943c39b328d313e085c718a826a224a2c0b62d79;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git --- diff --git a/doc/build/components/pydoc.myt b/doc/build/components/pydoc.myt new file mode 100644 index 0000000000..4acf6592c1 --- /dev/null +++ b/doc/build/components/pydoc.myt @@ -0,0 +1,93 @@ +<%method obj_doc> + <%args> + obj + + <%init> + import types + isclass = isinstance(obj, types.ClassType) or isinstance(obj, types.TypeType) + name= obj.__name__ + + if not isclass: + if hasattr(obj, '__ALL__'): + objects = obj.__ALL__ + else: + objects = obj.__dict__.keys() + functions = [getattr(obj, x, None) + for x in objects + if getattr(obj,x,None) is not None and + (isinstance(getattr(obj,x), types.FunctionType)) + and not getattr(obj,x).__name__[0] == '_' + ] + classes = [getattr(obj, x, None) + for x in objects + if getattr(obj,x,None) is not None and + (isinstance(getattr(obj,x), types.TypeType) + or isinstance(getattr(obj,x), types.ClassType)) + and not getattr(obj,x).__name__[0] == '_' + ] + else: + functions = [getattr(obj, x).im_func for x in obj.__dict__.keys() if isinstance(getattr(obj,x), types.MethodType) and not getattr(obj,x).__name__[0] == '_'] + classes = [] + + functions.sort(lambda a, b: cmp(a.__name__, b.__name__)) + classes.sort(lambda a, b: cmp(a.__name__, b.__name__)) + + +

+% if isclass: + Class <% name %> +% else: + Module <% name %> +% +

+<% obj.__doc__ %> +
+ +<&|formatting.myt:paramtable&> +% if not isclass and len(functions): +

Module Functions

+% for func in functions: +hi + <& SELF:function_doc, func=func &> +% +% + +% if len(classes): +

Classes

+% for class_ in classes: + <& SELF:obj_doc, obj=class_ &> +% +% + + + + +<%method function_doc> + <%args>func + <%init> + import inspect + argspec = inspect.getargspec(func) + argnames = argspec[0] + varargs = argspec[1] + varkw = argspec[2] + defaults = argspec[3] or () + argstrings = [] + i = 0 + for arg in argnames: + try: + default = defaults[i] + argstrings.append("%s=%s" % (arg, repr(default))) + i +=1 + except IndexError: + argstrings.append(arg) + if varargs is not None: + argstrings.append("*%s" % varargs) + if varkw is not None: + argstrings.append("**%s" % varkw) + + + huh ? <% repr(func) |h %> + <&| formatting.myt:function_doc, name="def " + func.__name__, arglist=argstrings &> + <% func.__doc__ %> + + \ No newline at end of file diff --git a/doc/build/content/docstrings.myt b/doc/build/content/docstrings.myt new file mode 100644 index 0000000000..8f6a0c7b25 --- /dev/null +++ b/doc/build/content/docstrings.myt @@ -0,0 +1,19 @@ +<%flags>inherit='document_base.myt' +<&|doclib.myt:item, name="docstrings", description="Modules and Classes" &> +<%init> + import sqlalchemy.schema as schema + import sqlalchemy.engine as engine + import sqlalchemy.sql as sql + import sqlalchemy.pool as pool + import sqlalchemy.mapper as mapper + import sqlalchemy.objectstore as objectstore + + + +<& pydoc.myt:obj_doc, obj=schema &> +<& pydoc.myt:obj_doc, obj=engine.SQLEngine &> +<& pydoc.myt:obj_doc, obj=sql &> +<& pydoc.myt:obj_doc, obj=pool &> +<& pydoc.myt:obj_doc, obj=mapper &> +<& pydoc.myt:obj_doc, obj=objectstore &> + \ No newline at end of file diff --git a/doc/build/genhtml.py b/doc/build/genhtml.py index d456b9cf5e..62bb7c9b0b 100644 --- a/doc/build/genhtml.py +++ b/doc/build/genhtml.py @@ -8,7 +8,7 @@ component_root = [ doccomp = ['document_base.myt'] output = os.path.dirname(os.getcwd()) -sys.path = ['./lib/'] + sys.path +sys.path = ['../../lib', './lib/'] + sys.path import documentgen