Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /examples/web_framework/profile_server.py [727d4a] .. [efe1d1] Maximize Restore

  Switch to side-by-side view

--- a/examples/web_framework/profile_server.py
+++ b/examples/web_framework/profile_server.py
@@ -1,7 +1,6 @@
 # profile_server.py
 
 import cProfile
-import pstats
 import simple_server
 
 def run(port=8080, logging=False, trace_sql=False, db_engine='sqlite3'):
@@ -11,6 +10,7 @@
         globals(), locals(), 'profile.out')
 
 def stats():
+    import pstats
     p = pstats.Stats('profile.out')
     p.sort_stats('time')
     p.print_stats(20)