MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / description

Method description

suds/servicedefinition.py:206–255  ·  view source on GitHub ↗

Get a textual description of the service for which this object represents. @return: A textual description. @rtype: str

(self, html=False)

Source from the content-addressed store, hash-verified

204 return ':'.join((prefix, name))
205
206 def description(self, html=False):
207 """
208 Get a textual description of the service for which this object
209 represents.
210 @return: A textual description.
211 @rtype: str
212 """
213 s = []
214 if html:
215 indent = lambda n: '<p>%*s' % (n * 3, ' ')
216 line = '<hr/>'
217 else:
218 indent = lambda n: '\n%*s' % (n * 3, ' ')
219 line = '\n' + '-'*80
220 s.append('Service ( %s ) tns="%s"' %
221 (self.service.name, self.wsdl.tns[1]))
222 s.append(indent(1))
223 s.append('Prefixes (%d)' % len(self.prefixes))
224 for p in self.prefixes:
225 s.append(indent(2))
226 s.append('%s = "%s"' % p)
227 s.append(indent(1))
228 s.append('Ports (%d):' % len(self.ports))
229 for p in self.ports:
230 s.append(indent(2))
231 s.append('(%s)' % p[0].name)
232 s.append(indent(3))
233 s.append('Methods (%d):' % len(p[1]))
234 for m in p[1]:
235 sig = []
236 s.append(indent(4))
237 sig.append(m[0])
238 sig.append('(')
239 for p in m[1]:
240 sig.append(self.xlate(p[1]))
241 sig.append(' ')
242 sig.append(p[0])
243 sig.append(', ')
244 sig.append(')')
245 try:
246 s.append(''.join(sig))
247 except:
248 pass
249 s.append(indent(3))
250 s.append('Types (%d):' % len(self.types))
251 for t in self.types:
252 s.append(indent(4))
253 s.append(self.xlate(t[0]))
254 s.append(line)
255 return ''.join(s)
256
257 def __str__(self):
258 try:

Callers 2

__str__Method · 0.95
htmlMethod · 0.95

Calls 3

xlateMethod · 0.95
indentFunction · 0.50
appendMethod · 0.45

Tested by

no test coverage detected