summaryrefslogtreecommitdiffstats
path: root/Lib/hotshot
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2002-07-18 19:17:54 (GMT)
committerFred Drake <fdrake@acm.org>2002-07-18 19:17:54 (GMT)
commit302e2bb81b462f2664b71da9f35c2969df8a330e (patch)
tree8bedf55b2451b65aa10a3068870bcfdf1bf32d47 /Lib/hotshot
parent7d17e6f3d05ec473a107a0d6b666f3637636d3bd (diff)
downloadcpython-302e2bb81b462f2664b71da9f35c2969df8a330e.zip
cpython-302e2bb81b462f2664b71da9f35c2969df8a330e.tar.gz
cpython-302e2bb81b462f2664b71da9f35c2969df8a330e.tar.bz2
Expose the fileno() method of the underlying profiler.
Diffstat (limited to 'Lib/hotshot')
-rw-r--r--Lib/hotshot/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/hotshot/__init__.py b/Lib/hotshot/__init__.py
index a23b2ee..b9f7866 100644
--- a/Lib/hotshot/__init__.py
+++ b/Lib/hotshot/__init__.py
@@ -25,6 +25,10 @@ class Profile:
"""Close the logfile and terminate the profiler."""
self._prof.close()
+ def fileno(self):
+ """Return the file descriptor of the profiler's log file."""
+ return self._prof.fileno()
+
def start(self):
"""Start the profiler."""
self._prof.start()