From: Deepak G. <de...@ar...> - 2005-03-03 20:07:40
|
On Thu, 2005-03-03 at 01:45 +0100, Michael Str=F6der wrote: > No easy way to make it work without another #if ? It took me a while to find it (I didn't know it existed!), but there is a function, Py_GetVersion, that will give you a version string (similar to sys.version). The third character is always the minor version number, so it looks like we can use that as an alternative to the #if. This patch is a little longer than the previous one, but it works just as well. Plus, this way we're doing a run-time check instead of a compile-time check. This will let people upgrade to Python 2.3+ without having to recompile python-ldap. I've attached the patch for posterity's sake, but I've gone ahead and commited the change to CVS. Good suggestion, Michael. :) Cheers! deepak -- Deepak Giridharagopal Applied Research Laboratories University of Texas at Austin |