Popular recipes by Robin Becker http://code.activestate.com/recipes/users/880795/2015-10-12T09:38:49-07:00ActiveState Code RecipesLoading c extensions from a repository build area (Python) 2015-10-12T09:38:49-07:00Robin Beckerhttp://code.activestate.com/recipes/users/880795/http://code.activestate.com/recipes/579109-loading-c-extensions-from-a-repository-build-area/ <p style="color: grey"> Python recipe 579109 by <a href="/recipes/users/880795/">Robin Becker</a> . </p> <p>I test reportlab with multiple pythons. Rather than having to install into different virtualenvs I prefer to build my C-extensions in the repository using pythonxx setup.py build_ext and place the repository source folder onto the python path (using eg a link). However, this means I must load the extensions from somewhere other than their natural place. The BuiltExtensionFinder can be used for this.</p> mad debugging using __builtin__ (Python) 2008-07-28T09:40:16-07:00Robin Beckerhttp://code.activestate.com/recipes/users/880795/http://code.activestate.com/recipes/576381-mad-debugging-using-__builtin__/ <p style="color: grey"> Python recipe 576381 by <a href="/recipes/users/880795/">Robin Becker</a> . </p> <p>Nasty way to get your debugging functions available everywhere.</p> Reference count checking (Python) 2006-06-11T01:15:56-07:00Robin Beckerhttp://code.activestate.com/recipes/users/880795/http://code.activestate.com/recipes/496791-reference-count-checking/ <p style="color: grey"> Python recipe 496791 by <a href="/recipes/users/880795/">Robin Becker</a> . </p> <p>Whilst testing that a C extension was causing a problem with reference counts I created some code to check that the reference counts of a set of variables were not being changed by a call to a specific C method. That code itself was buggy as the output of a particular reference count eg 12 could actually modify one or more of the reference counts being checked. The solution was to store the refcount info as a string.</p> Setting Win32 System Clock Using SNTP (Python) 2004-02-22T05:49:50-08:00Robin Beckerhttp://code.activestate.com/recipes/users/880795/http://code.activestate.com/recipes/270423-setting-win32-system-clock-using-sntp/ <p style="color: grey"> Python recipe 270423 by <a href="/recipes/users/880795/">Robin Becker</a> . </p> <p>Simon Foster's recipe "Simple (very) SNTP client" (see <a href="http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/117211" rel="nofollow">http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/117211</a>) inspired me to get SNTP to do something useful when our office moved to an ISP that didn't do client 37 time setting. This recipe uses SNTP to get an estimate of the time offset and uses Thomas Heller's wonderful ctypes module to allow getting/setting the win32 system time. I apologise in advance for the rather awful int vs long bit twiddling in _L2U32 etc.</p>