From 302e2bb81b462f2664b71da9f35c2969df8a330e Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Thu, 18 Jul 2002 19:17:54 +0000 Subject: [PATCH] Expose the fileno() method of the underlying profiler. --- Lib/hotshot/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/hotshot/__init__.py b/Lib/hotshot/__init__.py index a23b2ee6526..b9f7866e4ed 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()