Ignore:
Timestamp:
02/10/10 13:18:11 (14 years ago)
Author:
Malte Marquarding
Message:

Add compatibility.py for functools.wraps which doesn't exist in python <2.5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/__init__.py

    r1689 r1691  
    44"""
    55import os,sys,shutil, platform
    6 import functools
     6try:
     7    from functools import wraps as wraps_dec
     8except ImportError:
     9    from asap.compatibility import wraps as wraps_dec
    710
    811# Set up AIPSPATH and first time use of asap i.e. ~/.asap/*
     
    357360
    358361def print_log_dec(f):
    359     @functools.wraps(f)
     362    @wraps_dec(f)
    360363    def wrap_it(*args, **kw):
    361364        val = f(*args, **kw)
     
    398401            import matplotlib
    399402            matplotlib.use("TkAgg")
    400         import pylab
     403        from matplotlib import pylab
    401404        xyplotter = pylab
    402405        plotter = asapplotter(gui)
Note: See TracChangeset for help on using the changeset viewer.