Ignore:
Timestamp:
Jul 5, 2010 5:29:34 PM (11 years ago)
Author:
wehart
Message:

Eliminating the direct use of cProfile, which is not
backwards compatible to Python 2.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • coopr.pysp/trunk/coopr/pysp/ef_writer_script.py

    r2669 r2772  
    1717import textwrap
    1818import traceback
    19 import cProfile
     19try:
     20    import cProfile as profile
     21except ImportError:
     22    import profile
    2023import pstats
    2124import gc
     
    209212        #
    210213        tfile = pyutilib.services.TempfileManager.create_tempfile(suffix=".profile")
    211         tmp = cProfile.runctx('run_ef_writer(options,args)',globals(),locals(),tfile)
     214        tmp = profile.runctx('run_ef_writer(options,args)',globals(),locals(),tfile)
    212215        p = pstats.Stats(tfile).strip_dirs()
    213216        p.sort_stats('time', 'cum')
Note: See TracChangeset for help on using the changeset viewer.