All Samples(591) | Call(517) | Derive(0) | Import(74)
Get the documentation string for an object. All tabs are expanded to spaces. To clean up docstrings that are indented to line up with blocks of code, any whitespace than can be uniformly removed from the second line onwards is removed.
def getdoc(object):
"""Get the documentation string for an object.
All tabs are expanded to spaces. To clean up docstrings that are
indented to line up with blocks of code, any whitespace than can be
uniformly removed from the second line onwards is removed."""
try:
doc = object.__doc__
except AttributeError:
return None
if not isinstance(doc, types.StringTypes):
return None
return cleandoc(doc)
def getdoc(x):
from inspect import getdoc as _getdoc
s = _getdoc(x)
return s
class Parser(object):
src/s/y/sympy-tensor-HEAD/doc/generate_reference.py sympy-tensor(Download)
def getdoc(x):
from inspect import getdoc as _getdoc
s = _getdoc(x)
return s
class Parser(object):
src/s/y/sympy-HEAD/doc/generate_reference.py sympy(Download)
def getdoc(x):
from inspect import getdoc as _getdoc
s = _getdoc(x)
return s
class Parser(object):
src/a/p/Apydia-0.0.2/apydia/descriptors.py Apydia(Download)
import logging
import sys
from os.path import split
from inspect import ismodule, isclass, isfunction, ismethod, isbuiltin, \
getmodule, getsourcefile, findsource, getdoc, \
getcomments, getargspec, formatargspec
self.type = self.type[:-4]
# TODO: remove "-*- coding: ... -*-"
self.docstring = getdoc(value) or _getcomments(value) or ""
# TODO: introduce additional, local member names?
def generate_memberlist(self, type_=None):
src/t/o/topographica-HEAD/releases/0.9.3/topographica/topo/tkgui/plotgrouppanel.py topographica(Download)
import copy import re from inspect import getdoc from math import floor import ImageTk
# for creating the plotgroup. All of this needs to be cleaned up
# drastically.
self.balloon.bind(self.normalize_checkbutton,
getdoc(self.plotgroup.params()['normalize']))
self.balloon.bind(self.sheetcoords_checkbutton,
getdoc(self.plotgroup.params()['sheetcoords']))
self.balloon.bind(self.integerscaling_checkbutton,
getdoc(self.plotgroup.params()['integerscaling']))
src/t/o/topographica-HEAD/releases/0.9.2/topographica/topo/tkgui/plotgrouppanel.py topographica(Download)
import Numeric import copy from inspect import getdoc import Image import ImageTk
# for creating the plotgroup. All of this needs to be cleaned up
# drastically.
self.balloon.bind(self.normalize_checkbutton,
getdoc(self.plotgroup.params()['normalize']))
self.balloon.bind(self.sheetcoords_checkbutton,
getdoc(self.plotgroup.params()['sheetcoords']))
self.balloon.bind(self.integerscaling_checkbutton,
getdoc(self.plotgroup.params()['integerscaling']))
src/t/o/topographica-HEAD/releases/0.9.1/topographica/topo/tkgui/plotgrouppanel.py topographica(Download)
import Numeric import copy from inspect import getdoc import Image import ImageTk
# for creating the plotgroup. All of this needs to be cleaned up
# drastically.
self.balloon.bind(self.normalize_checkbutton,
getdoc(self.plotgroup.params()['normalize']))
self.balloon.bind(self.sheetcoords_checkbutton,
getdoc(self.plotgroup.params()['sheetcoords']))
self.balloon.bind(self.integerscaling_checkbutton,
getdoc(self.plotgroup.params()['integerscaling']))
src/t/o/topographica-HEAD/releases/0.9.0/topographica/topo/tkgui/plotgrouppanel.py topographica(Download)
import Numeric import copy from inspect import getdoc import Image import ImageTk
# for creating the plotgroup. All of this needs to be cleaned up
# drastically.
self.balloon.bind(self.normalize_checkbutton,
getdoc(self.plotgroup.params()['normalize']))
self.balloon.bind(self.sheetcoords_checkbutton,
getdoc(self.plotgroup.params()['sheetcoords']))
self.balloon.bind(self.integerscaling_checkbutton,
getdoc(self.plotgroup.params()['integerscaling']))
src/s/i/simplegrate-HEAD/sympy/doc/generate_reference.py simplegrate(Download)
def getdoc(x):
from inspect import getdoc as _getdoc
s = _getdoc(x)
return s
class Parser(object):
src/t/o/topographica-HEAD/releases/0.9.7/topographica/param/tk.py topographica(Download)
import ImageTk, Image, ImageOps import Tkinter as T from inspect import getdoc from tkMessageBox import _show,QUESTION,YESNO
### CEBALERT: confusing? ###
title=T.Label(parameter_window, text="("+param_name + " of " + (self._extraPO.name or 'class '+self._extraPO.__name__) + ")")
title.pack(side = "top")
self.balloon.bind(title,getdoc(self.get_parameter_object(param_name)))
############################
# uh-oh
# the box) but when there's [button], want popup help over the
# button.)
param_obj = self.get_parameter_object(name)
help_text = getdoc(param_obj)
if param_obj.default is not None:
# some params appear to have no docs!!!
def _combobox_updated(event,name=name):
w = self.representations[name]['widget']
help_text = getdoc(
self._string2object(
name,
self._tkvars[name]._original_get()))
self.balloon.bind(w,help_text)
w.bind("<<ComboboxSelected>>",_combobox_updated)
help_text = getdoc(self._string2object(name,tkvar._original_get()))
def _grid_param(self,parameter_name,row):
widget = self.representations[parameter_name]['widget']
label = self.representations[parameter_name]['label']
# CB: (I know about the code duplication here & in tkpo)
param_obj = self.get_parameter_object(parameter_name)
help_text = getdoc(param_obj)
### CEBALERT: confusing? ###
title=T.Label(parameter_window, text="("+param_name + " of " + (self._extraPO.name or 'class '+self._extraPO.__name__) + ")")
title.pack(side = "top")
self.balloon.bind(title,getdoc(self.get_parameter_object(param_name,self._extraPO)))
############################
# CEBALERT: don't want EditingParametersFrameWithApply
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 Next