Lines Matching refs:url
666 url = '%s.%s.html' % (path, name)
668 url = '%s.html' % name
673 return '<a href="%s">%s</a>' % (url, text)
675 def filelink(self, url, path):
677 return '<a href="file:%s">%s</a>' % (url, path)
697 url = escape(all).replace('"', '"')
698 results.append('<a href="%s">%s</a>' % (url, url))
700 url = 'https://www.rfc-editor.org/rfc/rfc%d.txt' % int(rfc)
701 results.append('<a href="%s">%s</a>' % (url, escape(all)))
703 url = 'https://peps.python.org/pep-%04d/' % int(pep)
704 results.append('<a href="%s">%s</a>' % (url, escape(all)))
758 url = urllib.parse.quote(path)
759 filelink = self.filelink(url, path)
2154 the url handler.
2301 >>> def my_url_handler(url, content_type):
2302 ... text = 'the URL sent was: (%s, %s)' % (url, content_type)
2313 and get first page. Use serverthread.url as the starting page.
2321 #... webbrowser.open(serverthread.url)
2418 self.url = 'http://%s:%d/' % (self.host, self.port)
2428 self.url = None
2439 def _url_handler(url, content_type="text/html"):
2440 """The pydoc url handler for use with the pydoc server.
2446 get_html_page(url) is returned.
2605 def html_getobj(url):
2606 obj = locate(url, forceload=1)
2607 if obj is None and url != 'None':
2610 content = html.document(obj, url)
2613 def html_error(url, exc):
2619 contents = heading + html.bigsection(url, 'error', contents)
2620 return "Error - %s" % url, contents
2622 def get_html_page(url):
2623 """Generate an HTML page for url."""
2624 complete_url = url
2625 if url.endswith('.html'):
2626 url = url[:-5]
2628 if url in ("", "index"):
2630 elif url == "topics":
2632 elif url == "keywords":
2634 elif '=' in url:
2635 op, _, url = url.partition('=')
2637 title, content = html_search(url)
2641 title, content = html_topicpage(url)
2643 title, content = html_getobj(url)
2646 if url in ("", "index"):
2650 title, content = html_getobj(url)
2652 title, content = html_topicpage(url)
2654 raise ValueError('bad pydoc url')
2656 title, content = html_getobj(url)
2662 if url.startswith('/'):
2663 url = url[1:]
2666 css_path = os.path.join(path_here, url)
2670 return get_html_page(url)
2671 # Errors outside the url handler are caught by the server.
2672 raise TypeError('unknown content type %r for url %s' % (content_type, url))
2689 webbrowser.open(serverthread.url)
2691 print('Server ready at', serverthread.url)
2699 webbrowser.open(serverthread.url)