Modules that provide differing functionality amongst different Python versions...

Allan Crooks googlegroups at sixtyten.org
Mon Apr 22 10:25:47 EDT 2002


holger krekel <pyth at devel.trillke.net> wrote in message news:<mailman.1019403879.24573.python-list at python.org>...

> exec forversion("2.2",

<snip>

I had considered using exec as a way of getting round it, but it seems
like quite a hack to get what I want (wrapping code in a string to
prevent Python accessing it properly).

Mind you, considering what I want to do, I suppose hacking is really
the only feasible solution. :)

Doing things via exec would ultimately mean that I couldn't take
advantage of PyChecker...

Thanks for the suggestion though...
Allan.



More information about the Python-list mailing list