call site 6 for execnet.Channel.__del__
misc/testing/test_initpkg.py - line 83
81
82
83
   def check_import(modpath): 
       print "checking import", modpath
->     assert __import__(modpath) 
test/rsession/web.py - line 5
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
   
   """ web server for py.test
-> """
   
   from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
   
   import thread, threading
   import re
   import time
   import random
   import Queue
   import os
   import sys
   import socket
   
   import py
   from py.__.test.rsession.rsession import RSession
   from py.__.test.rsession import repevent
   from py.__.test import collect
   from py.__.test.rsession.webdata import json
   
   DATADIR = py.path.local(__file__).dirpath("webdata")
   FUNCTION_LIST = ["main", "show_skip", "show_traceback", "show_info", "hide_info",
       "show_host", "hide_host", "hide_messagebox", "opt_scroll"]
   
   try:
       from pypy.rpython.ootypesystem.bltregistry import MethodDesc, BasicExternal
       from pypy.translator.js.main import rpython2javascript
       from pypy.translator.js import commproxy
       from pypy.translator.js.lib.support import callback
   
       commproxy.USE_MOCHIKIT = False
       IMPORTED_PYPY = True
   except (ImportError, NameError):
       class BasicExternal(object):
           pass
/usr/lib/python2.5/BaseHTTPServer.py - line 77
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
   """HTTP server base class.
   
   Note: the class in this module doesn't implement any HTTP request; see
   SimpleHTTPServer for simple implementations of GET, HEAD and POST
   (including CGI scripts).  It does, however, optionally implement HTTP/1.1
   persistent connections, as of version 0.3.
   
   Contents:
   
   - BaseHTTPRequestHandler: HTTP request handler base class
   - test: test function
   
   XXX To do:
   
   - log requests even later (to capture byte count)
   - log user-agent header and other interesting goodies
   - send error log to separate file
   """
   
   
   # See also:
   #
   # HTTP Working Group                                        T. Berners-Lee
   # INTERNET-DRAFT                                            R. T. Fielding
   # <draft-ietf-http-v10-spec-00.txt>                     H. Frystyk Nielsen
   # Expires September 8, 1995                                  March 8, 1995
   #
   # URL: http://www.ics.uci.edu/pub/ietf/http/draft-ietf-http-v10-spec-00.txt
   #
   # and
   #
   # Network Working Group                                      R. Fielding
   # Request for Comments: 2616                                       et al
   # Obsoletes: 2068                                              June 1999
   # Category: Standards Track
   #
   # URL: http://www.faqs.org/rfcs/rfc2616.html
   
   # Log files
   # ---------
   #
   # Here's a quote from the NCSA httpd docs about log file format.
   #
   # | The logfile format is as follows. Each line consists of:
   # |
   # | host rfc931 authuser [DD/Mon/YYYY:hh:mm:ss] "request" ddd bbbb
   # |
   # |        host: Either the DNS name or the IP number of the remote client
   # |        rfc931: Any information returned by identd for this person,
   # |                - otherwise.
   # |        authuser: If user sent a userid for authentication, the user name,
   # |                  - otherwise.
   # |        DD: Day
   # |        Mon: Month (calendar name)
   # |        YYYY: Year
   # |        hh: hour (24-hour format, the machine's timezone)
   # |        mm: minutes
   # |        ss: seconds
   # |        request: The first line of the HTTP request as sent by the client.
-> # |        ddd: the status code returned by the server, - if not available.
   # |        bbbb: the total number of bytes sent,
   # |              *not including the HTTP/1.0 header*, - if not available
   # |
   # | You can determine the name of the file accessed through request.
   #
   # (Actually, the latter is only true if you know the server configuration
   # at the time the request was made!)
   
   __version__ = "0.3"
   
   __all__ = ["HTTPServer", "BaseHTTPRequestHandler"]
   
   import sys
   import time
   import socket # For gethostbyaddr()
   import mimetools
   import SocketServer
   
   # Default error message
   DEFAULT_ERROR_MESSAGE = """\
   <head>
   <title>Error response</title>
   </head>
   <body>
   <h1>Error response</h1>
   <p>Error code %(code)d.
   <p>Message: %(message)s.
   <p>Error code explanation: %(code)s = %(explain)s.
   </body>
   """
   
   def _quote_html(html):
       return html.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")