Re: tmda-cgi and python2.6
Bob Hutchinson <[email protected]> Sun, 13 Feb 2011 21:44:41 +0000
| Newsgroups | gmane.mail.spam.tmda.user |
|---|---|
| Message-ID | <[email protected]> |
On Sunday 13 February 2011, Robert Withrow wrote: > Bob Hutchinson <hutchlists <at> midwales.com> writes: > > As a result of the recent Debian upgrade from lenny to squeeze tmda-cgi > > croaked horribly. After some fooling around I realised I had two versions > > of Python installed, 2.5 and 2.6 with 2.6 the default. > > I have tmda-cgi running on 2.6.5 by applying the following patch (not that > I know much about what is going on) and besides there are some deprecation > warnings that need cleaning up also... Thanks for the heads up, I will try it. > > # python --version > Python 2.6.5 > > > diff --git a/tmda-cgi.py b/tmda-cgi.py > index dcaebd3..9631698 100644 > --- a/tmda-cgi.py > +++ b/tmda-cgi.py > @@ -24,20 +24,20 @@ > # Python2.3 seems to have a problem when Defaults.py imports various > packages # from its directory. This nasty hack intercepts those imports > and adds a # "from TMDA" to them. > -OldImport = __builtins__.__import__ > -def NewImport(name, globals=None, locals=None, fromlist=None): > - if fromlist == None: > - if name == "Errors": > - from TMDA import Errors > - return Errors > - if name == "Util": > - from TMDA import Util > - return Util > - if name == "Version": > - from TMDA import Version > - return Version > - return OldImport(name, globals, locals, fromlist) > -__builtins__.__import__ = NewImport > +# OldImport = __builtins__.__import__ > +# def NewImport(name, globals=None, locals=None, fromlist=None): > +# if fromlist == None: > +# if name == "Errors": > +# from TMDA import Errors > +# return Errors > +# if name == "Util": > +# from TMDA import Util > +# return Util > +# if name == "Version": > +# from TMDA import Version > +# return Version > +# return OldImport(name, globals, locals, fromlist) > +# __builtins__.__import__ = NewImport > > # Prepare the traceback in case of uncaught exception > import os > > > > --------------------------------------------------------------------------- > --- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio > XE: Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > _______________________________________________ > tmda-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/tmda-users -- ----------------- Bob Hutchinson Midwales dot com ----------------- ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ tmda-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tmda-users