<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1986138544558251778</id><updated>2012-02-16T01:50:28.703-08:00</updated><category term='vba'/><category term='python querystring url'/><category term='ElementTree cElementTree py2exe django python'/><category term='py2exe python'/><category term='excel'/><category term='pdf combine merge overlay perl PDF::API2 pyPdf'/><category term='python py2exe servicemanager win32.extensions'/><category term='vb'/><title type='text'>Andrew Grossman@Work</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://andrewgrossmanatwork.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Andrew</name><uri>http://www.blogger.com/profile/12129511239345013686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rF2F5Y-8aFY/SZREc5iiQII/AAAAAAAADnA/YQwd0K6s2MM/S220/IMG_0038+head.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1986138544558251778.post-2207830630352566656</id><published>2011-11-30T08:43:00.000-08:00</published><updated>2011-11-30T08:45:00.497-08:00</updated><title type='text'>Documentation for SVA (subversion automation project)</title><content type='html'>Here is a link to documentation for the SVA project, since the previous one has been removed.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://web.archive.org/web/20091012043516/http://www.contextualdevelopment.com/labs/sva/commands/index"&gt;http://web.archive.org/web/20091012043516/http://www.contextualdevelopment.com/labs/sva/commands/index&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1986138544558251778-2207830630352566656?l=andrewgrossmanatwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewgrossmanatwork.blogspot.com/feeds/2207830630352566656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2011/11/documentation-for-sva-subversion.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/2207830630352566656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/2207830630352566656'/><link rel='alternate' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2011/11/documentation-for-sva-subversion.html' title='Documentation for SVA (subversion automation project)'/><author><name>Andrew</name><uri>http://www.blogger.com/profile/12129511239345013686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rF2F5Y-8aFY/SZREc5iiQII/AAAAAAAADnA/YQwd0K6s2MM/S220/IMG_0038+head.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1986138544558251778.post-2195073716911135873</id><published>2011-01-06T08:02:00.000-08:00</published><updated>2011-01-06T08:12:12.675-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python querystring url'/><title type='text'>A python function to add/update querystring arguments on a given url</title><content type='html'>&lt;pre name="code" /*class="brush: python;"*/ /*Code formatting is currently broken*/&gt;&lt;br /&gt;def add_get_args_to_url(url, arg_dict):&lt;br /&gt;    import urllib, urlparse&lt;br /&gt;&lt;br /&gt;    try:&lt;br /&gt;        from urlparse import parse_qs&lt;br /&gt;    except ImportError:&lt;br /&gt;        from cgi import parse_qs&lt;br /&gt;&lt;br /&gt;    url_parts = urlparse.urlparse(url)&lt;br /&gt;&lt;br /&gt;    qs_args = parse_qs(url_parts[4])&lt;br /&gt;    qs_args.update(arg_dict)&lt;br /&gt;&lt;br /&gt;    new_qs = urllib.urlencode(qs_args, True)&lt;br /&gt;&lt;br /&gt;    return urlparse.urlunparse(list(url_parts[0:4]) + [new_qs] + list(url_parts[5:]))&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1986138544558251778-2195073716911135873?l=andrewgrossmanatwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewgrossmanatwork.blogspot.com/feeds/2195073716911135873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2011/01/python-function-to-addupdate.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/2195073716911135873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/2195073716911135873'/><link rel='alternate' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2011/01/python-function-to-addupdate.html' title='A python function to add/update querystring arguments on a given url'/><author><name>Andrew</name><uri>http://www.blogger.com/profile/12129511239345013686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rF2F5Y-8aFY/SZREc5iiQII/AAAAAAAADnA/YQwd0K6s2MM/S220/IMG_0038+head.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1986138544558251778.post-2251560441567864624</id><published>2010-11-10T12:11:00.000-08:00</published><updated>2010-11-10T14:39:41.773-08:00</updated><title type='text'>Acquiring stock information in Excel from Yahoo Finance</title><content type='html'>Yahoo Finance has a nice feature where you can request stock information in csv format.  For instance, want the current earnings per share value for Bank of America? You can get that in a pretty raw form suited for automation.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://finance.yahoo.com/d/quotes.csv?s=BAC&amp;f=e"&gt;http://finance.yahoo.com/d/quotes.csv?s=BAC&amp;f=e&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There you go.  Click that, save it, and open it with Excel, and up will come the information that you asked for.&lt;br /&gt;&lt;br /&gt;You can request multiple pieces of information at a time, and a number of different data fields for them.  The list is here: &lt;a href="http://www.gummy-stuff.org/Yahoo-data.htm"&gt;http://www.gummy-stuff.org/Yahoo-data.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Let's take this a step further. We can make Excel automatically load this information from the Internet.  Not only will it eliminate the need to go look up this information and fill it in, but it will reload it whenever the worksheet is refreshed.&lt;br /&gt;&lt;br /&gt;To do this, we're going to write a VBA function that takes a ticker symbol and the field we are looking for.  &lt;br /&gt;&lt;br /&gt;&lt;pre name="code" /*class="brush: vb;"*/ /*Code formatting is currently broken*/&gt;&lt;br /&gt;Public Function GetQuote(ByVal ticker As String, ByVal field As String)&lt;br /&gt;'Valid field options can be found at http://www.gummy-stuff.org/Yahoo-data.htm&lt;br /&gt;    Dim objHttp As Object&lt;br /&gt;    Set objHttp = CreateObject("MSXML2.ServerXMLHTTP") 'Create an XMLHTTP object to access the web&lt;br /&gt;    Dim url As String&lt;br /&gt;    url = "http://finance.yahoo.com/d/quotes.csv?s=" &amp; ticker &amp; "&amp;f=" &amp; field 'Build our query consisting of our ticker symbol and the field we want&lt;br /&gt;    objHttp.Open "GET", url, False 'Open up our connection to Yahoo&lt;br /&gt;    objHttp.Send 'And get Yahoo's response&lt;br /&gt;    &lt;br /&gt;    'Before returning, knock off the last two characters from the response--they are junk&lt;br /&gt;    GetQuote = Left(objHttp.ResponseText, Len(objHttp.ResponseText) - 2)&lt;br /&gt;End Function&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;For those of you new to VBA, press Alt-F11 to bring up the VBA window.  Right-click in the Project window, and insert a new Module.  Then, just copy and paste the above code into the code window.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_rF2F5Y-8aFY/TNsGWqtCt3I/AAAAAAAAOS4/sD0D3vgaaj4/s1600/getquote5.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 217px;" src="http://2.bp.blogspot.com/_rF2F5Y-8aFY/TNsGWqtCt3I/AAAAAAAAOS4/sD0D3vgaaj4/s400/getquote5.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5538027153272256370" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now that we have our function, we can make use of it.  Returning to our worksheet, we can start entering our formula.  If you have Excel 2010 or later, Excel should fill in the name of the function you have added.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_rF2F5Y-8aFY/TNsG7m1r2hI/AAAAAAAAOTA/m3zILkKcIRQ/s1600/getquote1.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 290px;" src="http://3.bp.blogspot.com/_rF2F5Y-8aFY/TNsG7m1r2hI/AAAAAAAAOTA/m3zILkKcIRQ/s400/getquote1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5538027787889924626" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Fill in the ticker symbol and field you are looking up.  In this example, I'm using the function to create a matrix of values with the ticker symbols along the left and the field symbols along the top.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_rF2F5Y-8aFY/TNsFmUWetOI/AAAAAAAAOSg/zRBlv4hxqtY/s1600/getquote2.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 290px;" src="http://1.bp.blogspot.com/_rF2F5Y-8aFY/TNsFmUWetOI/AAAAAAAAOSg/zRBlv4hxqtY/s400/getquote2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5538026322638320866" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Excel will go out to Yahoo and get the requested data.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_rF2F5Y-8aFY/TNsFmgZv64I/AAAAAAAAOSo/CrJvpVZ7hJs/s1600/getquote3.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 290px;" src="http://3.bp.blogspot.com/_rF2F5Y-8aFY/TNsFmgZv64I/AAAAAAAAOSo/CrJvpVZ7hJs/s400/getquote3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5538026325873257346" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In this example, we can drag the cell border to fill the values down and over.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_rF2F5Y-8aFY/TNsFm8gKReI/AAAAAAAAOSw/13h3c6vQWN8/s1600/getquote4.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 290px;" src="http://3.bp.blogspot.com/_rF2F5Y-8aFY/TNsFm8gKReI/AAAAAAAAOSw/13h3c6vQWN8/s400/getquote4.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5538026333416343010" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1986138544558251778-2251560441567864624?l=andrewgrossmanatwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewgrossmanatwork.blogspot.com/feeds/2251560441567864624/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2010/11/acquiring-stock-information-in-excel.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/2251560441567864624'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/2251560441567864624'/><link rel='alternate' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2010/11/acquiring-stock-information-in-excel.html' title='Acquiring stock information in Excel from Yahoo Finance'/><author><name>Andrew</name><uri>http://www.blogger.com/profile/12129511239345013686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rF2F5Y-8aFY/SZREc5iiQII/AAAAAAAADnA/YQwd0K6s2MM/S220/IMG_0038+head.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_rF2F5Y-8aFY/TNsGWqtCt3I/AAAAAAAAOS4/sD0D3vgaaj4/s72-c/getquote5.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1986138544558251778.post-7081157961329797971</id><published>2009-04-03T14:01:00.000-07:00</published><updated>2009-04-03T14:04:45.220-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python py2exe servicemanager win32.extensions'/><title type='text'>No module named servicemanager - building a windows service with py2exe</title><content type='html'>Trying to build a windows service out of my standalone django application, I was using the various examples available, and kept running into the problem "No module named servicemanager" whenever I tried to run the generated executable.  There is almost nothing out there on this, but it occurred to me that perhaps I needed to install/reinstall the &lt;a href="http://python.net/crew/mhammond/win32/Downloads.html"&gt;Python Win32 Extensions&lt;/a&gt;.  Turns out, that was it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1986138544558251778-7081157961329797971?l=andrewgrossmanatwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewgrossmanatwork.blogspot.com/feeds/7081157961329797971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2009/04/no-module-named-servicemanager-building.html#comment-form' title='40 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/7081157961329797971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/7081157961329797971'/><link rel='alternate' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2009/04/no-module-named-servicemanager-building.html' title='No module named servicemanager - building a windows service with py2exe'/><author><name>Andrew</name><uri>http://www.blogger.com/profile/12129511239345013686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rF2F5Y-8aFY/SZREc5iiQII/AAAAAAAADnA/YQwd0K6s2MM/S220/IMG_0038+head.png'/></author><thr:total>40</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1986138544558251778.post-4446169174726680751</id><published>2009-03-31T08:32:00.000-07:00</published><updated>2009-03-31T08:36:26.468-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='py2exe python'/><title type='text'>py2exe can't import packages that should be available (simplejson)</title><content type='html'>In my py2exe build script, I was specifying a few modules to be imported that for some reason would fail to import.  I could import these from the python prompt, but the build script would give the following:&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;running py2exe&lt;br /&gt;*** searching for required modules ***&lt;br /&gt;Traceback (most recent call last):&lt;br /&gt;  File "setup.py", line 235, in &lt;module&gt;&lt;br /&gt;    console=[ 'runcm.py' ],&lt;br /&gt;  File "C:\PYTHON25\LIB\distutils\core.py", line 151, in setup&lt;br /&gt;    dist.run_commands()&lt;br /&gt;  File "C:\PYTHON25\LIB\distutils\dist.py", line 974, in run_commands&lt;br /&gt;    self.run_command(cmd)&lt;br /&gt;  File "C:\PYTHON25\LIB\distutils\dist.py", line 994, in run_command&lt;br /&gt;    cmd_obj.run()&lt;br /&gt;  File "C:\Python25\lib\site-packages\py2exe\build_exe.py", line 243, in run&lt;br /&gt;    self._run()&lt;br /&gt;  File "C:\Python25\lib\site-packages\py2exe\build_exe.py", line 296, in _run&lt;br /&gt;    self.find_needed_modules(mf, required_files, required_modules)&lt;br /&gt;  File "C:\Python25\lib\site-packages\py2exe\build_exe.py", line 1297, in find_n&lt;br /&gt;eeded_modules&lt;br /&gt;    mf.import_hook(mod)&lt;br /&gt;  File "C:\Python25\lib\site-packages\py2exe\mf.py", line 719, in import_hook&lt;br /&gt;    return Base.import_hook(self,name,caller,fromlist,level)&lt;br /&gt;  File "C:\Python25\lib\site-packages\py2exe\mf.py", line 136, in import_hook&lt;br /&gt;    q, tail = self.find_head_package(parent, name)&lt;br /&gt;  File "C:\Python25\lib\site-packages\py2exe\mf.py", line 204, in find_head_pack&lt;br /&gt;age&lt;br /&gt;    raise ImportError, "No module named " + qname&lt;br /&gt;ImportError: No module named simplejson&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Apparently the problem has to do with that the modules in site-packages stored as zipped eggs would not import.  Simply unzipping the simplejson egg contents so that the simplejson directory was in the site-packages directory solved the problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1986138544558251778-4446169174726680751?l=andrewgrossmanatwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewgrossmanatwork.blogspot.com/feeds/4446169174726680751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2009/03/py2exe-cant-import-packages-that-should.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/4446169174726680751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/4446169174726680751'/><link rel='alternate' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2009/03/py2exe-cant-import-packages-that-should.html' title='py2exe can&apos;t import packages that should be available (simplejson)'/><author><name>Andrew</name><uri>http://www.blogger.com/profile/12129511239345013686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rF2F5Y-8aFY/SZREc5iiQII/AAAAAAAADnA/YQwd0K6s2MM/S220/IMG_0038+head.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1986138544558251778.post-6656836079174373215</id><published>2009-03-12T10:56:00.000-07:00</published><updated>2009-03-12T11:01:28.356-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ElementTree cElementTree py2exe django python'/><title type='text'>'module' object has no attribute 'tostring' - elementtree with py2exe compiled django app</title><content type='html'>In that Django py2exe compiled app, I am making use of ElementTree.  Code that worked properly on my development server was complaining about the ElementTree module I was using not having a tostring method.  &lt;br /&gt;&lt;br /&gt;Really?  Since when does xml.etree.cElementTree (using Python 2.5 here) not have a tostring method?&lt;br /&gt;&lt;br /&gt;The answer?  When xml.etree.ElementTree isn't present.  A number of the cElementTree methods are merely mapped to the ElementTree module, so if the xml.etree.ElementTree isn't included along with xml.etree.cElementTree in the py2exe includes, cElementTree will be missing components.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1986138544558251778-6656836079174373215?l=andrewgrossmanatwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewgrossmanatwork.blogspot.com/feeds/6656836079174373215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2009/03/module-object-has-no-attribute-tostring.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/6656836079174373215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/6656836079174373215'/><link rel='alternate' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2009/03/module-object-has-no-attribute-tostring.html' title='&apos;module&apos; object has no attribute &apos;tostring&apos; - elementtree with py2exe compiled django app'/><author><name>Andrew</name><uri>http://www.blogger.com/profile/12129511239345013686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rF2F5Y-8aFY/SZREc5iiQII/AAAAAAAADnA/YQwd0K6s2MM/S220/IMG_0038+head.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1986138544558251778.post-3360939420544666751</id><published>2009-03-06T06:26:00.001-08:00</published><updated>2009-03-06T07:11:44.292-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pdf combine merge overlay perl PDF::API2 pyPdf'/><title type='text'>Merge/Combine two pdf pages into a single pdf page (Perl)</title><content type='html'>I needed to be able to add markup to an existing pdf file.  In particular, I have a template and need to add a barcode programmatically.  However, I am working mostly in Python and had already written the code to generate my barcode with placement, and wanted to just overlay that onto my existing pdf template.  &lt;br /&gt;&lt;br /&gt;With the template pdf:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_rF2F5Y-8aFY/SbE25tmYkEI/AAAAAAAADp8/ev8YfC5T8Hs/s1600-h/freecar2.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 247px; height: 320px;" src="http://2.bp.blogspot.com/_rF2F5Y-8aFY/SbE25tmYkEI/AAAAAAAADp8/ev8YfC5T8Hs/s320/freecar2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5310085800767557698" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And the barcode pdf:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_rF2F5Y-8aFY/SbE26UfxASI/AAAAAAAADqE/kgklN1MjPO0/s1600-h/barcode2.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 246px; height: 320px;" src="http://2.bp.blogspot.com/_rF2F5Y-8aFY/SbE26UfxASI/AAAAAAAADqE/kgklN1MjPO0/s320/barcode2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5310085811208782114" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I was aiming for:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_rF2F5Y-8aFY/SbE26XNSonI/AAAAAAAADqM/K2q78opUeQI/s1600-h/combined.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 247px; height: 320px;" src="http://3.bp.blogspot.com/_rF2F5Y-8aFY/SbE26XNSonI/AAAAAAAADqM/K2q78opUeQI/s320/combined.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5310085811936600690" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;First, I attempted to do this with the &lt;a href="http://pybrary.net/pyPdf/"&gt;pyPdf &lt;/a&gt;library.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="brush: python"&gt;&lt;br /&gt;from pyPdf import PdfFileWriter, PdfFileReader&lt;br /&gt;barcodepdf = PdfFileReader(file("barcode.pdf", "rb"))&lt;br /&gt;templatepdf = PdfFileReader(file("freecar.pdf", "rb"))&lt;br /&gt;output = PdfFileWriter()&lt;br /&gt;barcodePage = barcodepdf.getPage(0)&lt;br /&gt;templatePage = templatepdf.getPage(0)&lt;br /&gt;&lt;br /&gt;templatePage.mergePage(barcodePage)&lt;br /&gt;output.addPage(templatePage)&lt;br /&gt;&lt;br /&gt;outputStream = file("output.pdf", "wb")&lt;br /&gt;output.write(outputStream)&lt;br /&gt;outputStream.close()&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This works in my samples, but I encountered problems with my application template: my i and E characters were turned invisible.  Maybe a font problem?  &lt;br /&gt;&lt;br /&gt;Here's what I was looking at:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_rF2F5Y-8aFY/SbE49TMiOuI/AAAAAAAADqU/qZTVDIrGKqk/s1600-h/badtext.PNG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 26px;" src="http://3.bp.blogspot.com/_rF2F5Y-8aFY/SbE49TMiOuI/AAAAAAAADqU/qZTVDIrGKqk/s320/badtext.PNG" border="0" alt=""id="BLOGGER_PHOTO_ID_5310088061422549730" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I decided to go with the Perl &lt;a href="http://search.cpan.org/dist/PDF-API2/"&gt;PDF::API2&lt;/a&gt; library.  It properly handled my files and gave me the output I was looking for--with no missing characters.&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;#!/usr/bin/perl&lt;br /&gt;#------------------#&lt;br /&gt;# PROGRAM:     &lt;br /&gt;# mergepdfpage.pl                                  &lt;br /&gt;#      &lt;br /&gt;# USAGE:       &lt;br /&gt;# mergepdfpage.pl in1.pdf in2.pdf out.pdf&lt;br /&gt;#         &lt;br /&gt;# DESCRIPTION: &lt;br /&gt;# Combine the first page from &lt;br /&gt;# two input pdf files&lt;br /&gt;# into a single page in a &lt;br /&gt;# new pdf file. &lt;br /&gt;#------------------#&lt;br /&gt;&lt;br /&gt;use PDF::API2;&lt;br /&gt;$input1pdf = PDF::API2-&gt;open($ARGV[0]);&lt;br /&gt;$input2pdf = PDF::API2-&gt;open($ARGV[1]);&lt;br /&gt;$outputpdf = PDF::API2-&gt;new;&lt;br /&gt;&lt;br /&gt;# Bring in the template page&lt;br /&gt;$page = $outputpdf-&gt;importpage($input1pdf,1); &lt;br /&gt;&lt;br /&gt;# Overlay the second input page over the first&lt;br /&gt;$page = $outputpdf-&gt;importpage&lt;br /&gt;       ($input2pdf,1, $outputpdf-&gt;openpage(1)); &lt;br /&gt;&lt;br /&gt;#Save the new file&lt;br /&gt;$outputpdf-&gt;saveas($ARGV[2]);&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1986138544558251778-3360939420544666751?l=andrewgrossmanatwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewgrossmanatwork.blogspot.com/feeds/3360939420544666751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2009/03/mergecombine-two-pdf-pages-into-single.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/3360939420544666751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/3360939420544666751'/><link rel='alternate' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2009/03/mergecombine-two-pdf-pages-into-single.html' title='Merge/Combine two pdf pages into a single pdf page (Perl)'/><author><name>Andrew</name><uri>http://www.blogger.com/profile/12129511239345013686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rF2F5Y-8aFY/SZREc5iiQII/AAAAAAAADnA/YQwd0K6s2MM/S220/IMG_0038+head.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_rF2F5Y-8aFY/SbE25tmYkEI/AAAAAAAADp8/ev8YfC5T8Hs/s72-c/freecar2.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1986138544558251778.post-9025993347542533351</id><published>2009-03-04T05:26:00.000-08:00</published><updated>2009-03-04T06:09:46.012-08:00</updated><title type='text'>Django Admin not showing tables under code compiled with py2exe</title><content type='html'>I have a Django-based project that I am building using py2exe.  Unfortunately, the admin piece does not seem to like something here--my development non-py2exed version works fine, but no tables show up in the py2exe version's admin.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_rF2F5Y-8aFY/Sa6GSvxnjdI/AAAAAAAADpk/0CrX-YtnDto/s1600-h/djangonoperm.PNG"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 99px;" src="http://2.bp.blogspot.com/_rF2F5Y-8aFY/Sa6GSvxnjdI/AAAAAAAADpk/0CrX-YtnDto/s400/djangonoperm.PNG" border="0" alt=""id="BLOGGER_PHOTO_ID_5309328667336740306" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So what's the problem?  Well, first off, it's rather hard to debug in py2exed Django:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_rF2F5Y-8aFY/Sa6HcXGPAjI/AAAAAAAADps/FKxLvRCPdWE/s1600-h/djangonodebug.PNG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 382px; height: 400px;" src="http://1.bp.blogspot.com/_rF2F5Y-8aFY/Sa6HcXGPAjI/AAAAAAAADps/FKxLvRCPdWE/s400/djangonodebug.PNG" border="0" alt=""id="BLOGGER_PHOTO_ID_5309329932022645298" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So, after muddling through with thrown exceptions (logging would have been an option as well), I found the culprit.&lt;br /&gt;&lt;br /&gt;In django/contrib/admin/__init__.py lives the admin autodiscover() function.  The following part of this function doesn't behave as intended:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="brush: python"&gt;&lt;br /&gt;        # Step 2: use imp.find_module to find the app's admin.py. For some&lt;br /&gt;        # reason imp.find_module raises ImportError if the app can't be found&lt;br /&gt;        # but doesn't actually try to import the module. So skip this app if&lt;br /&gt;        # its admin.py doesn't exist&lt;br /&gt;        try:&lt;br /&gt;            imp.find_module('admin', app_path)&lt;br /&gt;        except ImportError:&lt;br /&gt;            continue&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I'm not familiar with the &lt;a href="http://docs.python.org/library/imp.html"&gt;imp module&lt;/a&gt;, but it would seem it as though maybe it requires the python source?  Or at least something more pure than the mangled code provided by py2exe.&lt;br /&gt;&lt;br /&gt;Since imp.find_module is failing, we can just look to import the admin module for each app:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="brush: python"&gt;&lt;br /&gt;        try:&lt;br /&gt;            imp.find_module('admin', app_path)&lt;br /&gt;        except ImportError:&lt;br /&gt;            try: #In py2exe compiled code, imp will have failed to find the admin module, so we will guess and try to import the 'app'.admin&lt;br /&gt;                __import__(app+'.admin', globals(), locals(), [])&lt;br /&gt;            except ImportError:&lt;br /&gt;                pass&lt;br /&gt;                &lt;br /&gt;            continue&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now, it's not necessarily going to be convenient to patch the django source, so we can just create our own autodiscover function and call that.&lt;br /&gt;&lt;br /&gt;The following goes in my util.py:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="brush: python"&gt;&lt;br /&gt;from django.contrib.admin import LOADING&lt;br /&gt;&lt;br /&gt;LOADING = False&lt;br /&gt;&lt;br /&gt;def autodiscover():&lt;br /&gt;    """&lt;br /&gt;    Auto-discover INSTALLED_APPS admin.py modules and fail silently when&lt;br /&gt;    not present. This forces an import on them to register any admin bits they&lt;br /&gt;    may want.&lt;br /&gt;    """&lt;br /&gt;    # Bail out if autodiscover didn't finish loading from a previous call so&lt;br /&gt;    # that we avoid running autodiscover again when the URLConf is loaded by&lt;br /&gt;    # the exception handler to resolve the handler500 view.  This prevents an&lt;br /&gt;    # admin.py module with errors from re-registering models and raising a&lt;br /&gt;    # spurious AlreadyRegistered exception (see #8245).&lt;br /&gt;    global LOADING&lt;br /&gt;    if LOADING:&lt;br /&gt;        return&lt;br /&gt;    LOADING = True&lt;br /&gt;&lt;br /&gt;    import imp&lt;br /&gt;    from django.conf import settings&lt;br /&gt;&lt;br /&gt;    for app in settings.INSTALLED_APPS:&lt;br /&gt;        # For each app, we need to look for an admin.py inside that app's&lt;br /&gt;        # package. We can't use os.path here -- recall that modules may be&lt;br /&gt;        # imported different ways (think zip files) -- so we need to get&lt;br /&gt;        # the app's __path__ and look for admin.py on that path.&lt;br /&gt;&lt;br /&gt;        # Step 1: find out the app's __path__ Import errors here will (and&lt;br /&gt;        # should) bubble up, but a missing __path__ (which is legal, but weird)&lt;br /&gt;        # fails silently -- apps that do weird things with __path__ might&lt;br /&gt;        # need to roll their own admin registration.&lt;br /&gt;        try:&lt;br /&gt;            app_path = __import__(app, {}, {}, [app.split('.')[-1]]).__path__&lt;br /&gt;        except AttributeError:&lt;br /&gt;            continue&lt;br /&gt;&lt;br /&gt;        # Step 2: use imp.find_module to find the app's admin.py. For some&lt;br /&gt;        # reason imp.find_module raises ImportError if the app can't be found&lt;br /&gt;        # but doesn't actually try to import the module. So skip this app if&lt;br /&gt;        # its admin.py doesn't exist&lt;br /&gt;        try:&lt;br /&gt;            imp.find_module('admin', app_path)&lt;br /&gt;        except ImportError:&lt;br /&gt;            try: #In py2exe compiled code, imp will have failed to find the admin module, so we will guess and try to import the 'app'.admin&lt;br /&gt;                __import__(app+'.admin', globals(), locals(), [])&lt;br /&gt;            except ImportError:&lt;br /&gt;                pass&lt;br /&gt;                &lt;br /&gt;            continue&lt;br /&gt;&lt;br /&gt;        # Step 3: import the app's admin file. If this has errors we want them&lt;br /&gt;        # to bubble up.&lt;br /&gt;        __import__("%s.admin" % app)&lt;br /&gt;    # autodiscover was successful, reset loading flag.&lt;br /&gt;    LOADING = False&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And then in urls.py, where autodiscover() was already being called:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="brush: python"&gt;&lt;br /&gt;from django.contrib import admin #Still importing the admin module to map our urls&lt;br /&gt;#admin.autodiscover() #We are going to use our custom autodiscover instead&lt;br /&gt;from util import autodiscover&lt;br /&gt;autodiscover()&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Rebuild and we have admin.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_rF2F5Y-8aFY/Sa6Lci6hkuI/AAAAAAAADp0/a8RGrzMx0ww/s1600-h/djangoadminworking.PNG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 157px;" src="http://4.bp.blogspot.com/_rF2F5Y-8aFY/Sa6Lci6hkuI/AAAAAAAADp0/a8RGrzMx0ww/s400/djangoadminworking.PNG" border="0" alt=""id="BLOGGER_PHOTO_ID_5309334333241266914" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1986138544558251778-9025993347542533351?l=andrewgrossmanatwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewgrossmanatwork.blogspot.com/feeds/9025993347542533351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2009/03/django-admin-not-showing-tables-under.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/9025993347542533351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/9025993347542533351'/><link rel='alternate' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2009/03/django-admin-not-showing-tables-under.html' title='Django Admin not showing tables under code compiled with py2exe'/><author><name>Andrew</name><uri>http://www.blogger.com/profile/12129511239345013686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rF2F5Y-8aFY/SZREc5iiQII/AAAAAAAADnA/YQwd0K6s2MM/S220/IMG_0038+head.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_rF2F5Y-8aFY/Sa6GSvxnjdI/AAAAAAAADpk/0CrX-YtnDto/s72-c/djangonoperm.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1986138544558251778.post-5148295737549175122</id><published>2009-02-23T07:04:00.000-08:00</published><updated>2009-02-23T07:26:35.905-08:00</updated><title type='text'>HTTPS through CherryPy webserver standalone</title><content type='html'>In trying to get my standalone CherryPy webserver to serve over https, I can across the following CherryPy documentation: &lt;a href="http://www.stderr.org/doc/cherrypy-doc/html/howto/node10.html"&gt;http://www.stderr.org/doc/cherrypy-doc/html/howto/node10.html&lt;/a&gt;.  It stated:&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;Once you have PyOpenSSL installed, all you have to do is add 2 lines in your CherryPy config file, in the server section:&lt;br /&gt;&lt;br /&gt;sslKeyFile=/path/to/ssl/key/file&lt;br /&gt;sslCertificateFile=/path/to/ssl/certificate/file&lt;br /&gt;&lt;br /&gt;And that's it ! &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Not so much.  I tried this, and then tried to connect over https.  The result?&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;SSL received a record that exceeded the maximum permissible length&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I believe those lines are for configuration with use of Apache, not the standalone server.  To get the standalone server working, I had to set server variables as follows (substitute your own relative key/cert/port values):&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="brush: python;"&gt;&lt;br /&gt;    cherrypy.server.socket_port = 443&lt;br /&gt;    cherrypy.server.ssl_certificate = 'ssl/server.crt'&lt;br /&gt;    cherrypy.server.ssl_private_key = 'ssl/rsa.key'&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1986138544558251778-5148295737549175122?l=andrewgrossmanatwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewgrossmanatwork.blogspot.com/feeds/5148295737549175122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2009/02/https-through-cherrypy-webserver.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/5148295737549175122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/5148295737549175122'/><link rel='alternate' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2009/02/https-through-cherrypy-webserver.html' title='HTTPS through CherryPy webserver standalone'/><author><name>Andrew</name><uri>http://www.blogger.com/profile/12129511239345013686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rF2F5Y-8aFY/SZREc5iiQII/AAAAAAAADnA/YQwd0K6s2MM/S220/IMG_0038+head.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1986138544558251778.post-8222709600569766436</id><published>2009-02-18T07:05:00.000-08:00</published><updated>2009-02-18T07:11:27.717-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vb'/><category scheme='http://www.blogger.com/atom/ns#' term='excel'/><category scheme='http://www.blogger.com/atom/ns#' term='vba'/><title type='text'>VBA Excel - Formatting a column of numbers to a given precision, stripping out the decimal place, and adding leading zeros to satisfy a minimum length</title><content type='html'>&lt;pre name="code" class="brush: vb;"&gt;&lt;br /&gt;'Return the number dNumber increased to the power iExponent&lt;br /&gt;Function Pow(ByVal dNumber As Double, ByVal iExponent As Integer) As Double&lt;br /&gt;    Pow = 1&lt;br /&gt;    &lt;br /&gt;    Dim iCounter As Integer&lt;br /&gt;    &lt;br /&gt;    For iCounter = 1 To iExponent&lt;br /&gt;        Pow = Pow * dNumber&lt;br /&gt;    Next iCounter&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;'Convert the values in the active column to the given precision, with no decimal place, filled with leading zeros to satisfy a minimum length&lt;br /&gt;Sub ConvertColToTextNoDecimal(ByVal iPrecision As Integer, ByVal iMinimumLength As Integer)&lt;br /&gt;    Dim row As Long&lt;br /&gt;    Dim col As Long&lt;br /&gt;    &lt;br /&gt;    col = Selection.Column 'We are going to process whatever column is currently selected&lt;br /&gt;    &lt;br /&gt;    Dim val As Variant&lt;br /&gt;    &lt;br /&gt;    For row = 2 To ActiveSheet.UsedRange.Rows.Count 'Assume we are processing from below a header row to the last used row in the selected sheet&lt;br /&gt;        val = ActiveSheet.Cells(row, col).Value 'Get the current value&lt;br /&gt;        &lt;br /&gt;        On Error GoTo NextRow&lt;br /&gt;        val = CStr(Round(CDbl(val) * Pow(10, iPrecision), 0)) 'Round to the given precision, then shift off the decimal place&lt;br /&gt;        &lt;br /&gt;        While Len(val) &lt; iMinimumLength 'If the value we have isn't long enough:&lt;br /&gt;            val = "0" &amp; val             'Prepend a zero&lt;br /&gt;        Wend&lt;br /&gt;        &lt;br /&gt;        ActiveSheet.Cells(row, col).FormulaR1C1 = "'" &amp; val 'Mark this value as text, so we don't lose any leading zeros&lt;br /&gt;NextRow:&lt;br /&gt;        On Error GoTo 0&lt;br /&gt;    Next row&lt;br /&gt;    &lt;br /&gt;End Sub&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Example usage:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="brush: vb;"&gt;&lt;br /&gt;&lt;br /&gt;'Round to 3 decimal places, remove the decimal point&lt;br /&gt;Sub ConvertColTo3Dec()&lt;br /&gt;    ConvertColToTextNoDecimal 3, 0&lt;br /&gt;End &lt;br /&gt;&lt;br /&gt;'Round to 2 decimal places, remove the decimal point&lt;br /&gt;Sub ConvertColTo2Dec()&lt;br /&gt;    ConvertColToTextNoDecimal 2, 0&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;'Round to 1 decimal place, remove the decimal point&lt;br /&gt;Sub ConvertColTo1Dec()&lt;br /&gt;    ConvertColToTextNoDecimal 1, 0&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;'Round to 0 decimal places&lt;br /&gt;Sub ConvertColTo0Dec()&lt;br /&gt;    ConvertColToTextNoDecimal 0, 0&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;'No decimal place changes, but force enough leading zeros for 3 digits&lt;br /&gt;Sub ConvertColTo0Filled3Long()&lt;br /&gt;    ConvertColToTextNoDecimal 0, 3&lt;br /&gt;End Sub&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1986138544558251778-8222709600569766436?l=andrewgrossmanatwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewgrossmanatwork.blogspot.com/feeds/8222709600569766436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2009/02/vba-excel-formatting-column-of-numbers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/8222709600569766436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/8222709600569766436'/><link rel='alternate' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2009/02/vba-excel-formatting-column-of-numbers.html' title='VBA Excel - Formatting a column of numbers to a given precision, stripping out the decimal place, and adding leading zeros to satisfy a minimum length'/><author><name>Andrew</name><uri>http://www.blogger.com/profile/12129511239345013686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rF2F5Y-8aFY/SZREc5iiQII/AAAAAAAADnA/YQwd0K6s2MM/S220/IMG_0038+head.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1986138544558251778.post-1446759025475381906</id><published>2009-02-13T10:55:00.001-08:00</published><updated>2009-02-13T10:55:16.730-08:00</updated><title type='text'>Django: AttributeError: 'module' object has no attribute 'JSONEncoder'</title><content type='html'>Running a Django syncdb, I've encountered a problem: &lt;b&gt;AttributeError: 'module' object has no attribute 'JSONEncoder'&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;$ python ./manage.py syncdb&lt;br /&gt;Traceback (most recent call last):&lt;br /&gt;  File "./manage.py", line 11, in ?&lt;br /&gt;    execute_manager(settings)&lt;br /&gt;  File "/usr/lib/python2.4/site-packages/django/core/management/__init__.py", line 347, in execute_manager&lt;br /&gt;    utility.execute()&lt;br /&gt;  File "/usr/lib/python2.4/site-packages/django/core/management/__init__.py", line 295, in execute&lt;br /&gt;    self.fetch_command(subcommand).run_from_argv(self.argv)&lt;br /&gt;  File "/usr/lib/python2.4/site-packages/django/core/management/base.py", line 195, in run_from_argv&lt;br /&gt;    self.execute(*args, **options.__dict__)&lt;br /&gt;  File "/usr/lib/python2.4/site-packages/django/core/management/base.py", line 222, in execute&lt;br /&gt;    output = self.handle(*args, **options)&lt;br /&gt;  File "/usr/lib/python2.4/site-packages/django/core/management/base.py", line 351, in handle&lt;br /&gt;    return self.handle_noargs(**options)&lt;br /&gt;  File "/usr/lib/python2.4/site-packages/django/core/management/commands/syncdb.py", line 149, in handle_noargs&lt;br /&gt;    call_command('loaddata', 'initial_data', verbosity=verbosity)&lt;br /&gt;  File "/usr/lib/python2.4/site-packages/django/core/management/__init__.py", line 158, in call_command&lt;br /&gt;    return klass.execute(*args, **options)&lt;br /&gt;  File "/usr/lib/python2.4/site-packages/django/core/management/base.py", line 222, in execute&lt;br /&gt;    output = self.handle(*args, **options)&lt;br /&gt;  File "/usr/lib/python2.4/site-packages/django/core/management/commands/loaddata.py", line 91, in handle&lt;br /&gt;    formats = serializers.get_public_serializer_formats()&lt;br /&gt;  File "/usr/lib/python2.4/site-packages/django/core/serializers/__init__.py", line 72, in get_public_serializer_formats&lt;br /&gt;    _load_serializers()&lt;br /&gt;  File "/usr/lib/python2.4/site-packages/django/core/serializers/__init__.py", line 108, in _load_serializers&lt;br /&gt;    register_serializer(format, BUILTIN_SERIALIZERS[format], serializers)&lt;br /&gt;  File "/usr/lib/python2.4/site-packages/django/core/serializers/__init__.py", line 50, in register_serializer&lt;br /&gt;    module = __import__(serializer_module, {}, {}, [''])&lt;br /&gt;  File "/usr/lib/python2.4/site-packages/django/core/serializers/json.py", line 44, in ?&lt;br /&gt;    class DjangoJSONEncoder(simplejson.JSONEncoder):&lt;br /&gt;AttributeError: 'module' object has no attribute 'JSONEncoder'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Googling says that the problem is that I have python-json installed, and that I need to have python-simplejson installed too.  Except that I already do have that installed.  So, when running a syncdb, just move json.py in the Python site-packages directory aside for a moment, and everything should run fine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1986138544558251778-1446759025475381906?l=andrewgrossmanatwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewgrossmanatwork.blogspot.com/feeds/1446759025475381906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2009/02/django-attributeerror-module-object-has.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/1446759025475381906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/1446759025475381906'/><link rel='alternate' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2009/02/django-attributeerror-module-object-has.html' title='Django: AttributeError: &apos;module&apos; object has no attribute &apos;JSONEncoder&apos;'/><author><name>Andrew</name><uri>http://www.blogger.com/profile/12129511239345013686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rF2F5Y-8aFY/SZREc5iiQII/AAAAAAAADnA/YQwd0K6s2MM/S220/IMG_0038+head.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1986138544558251778.post-8580169124391372507</id><published>2009-02-13T06:55:00.000-08:00</published><updated>2009-02-13T09:33:39.547-08:00</updated><title type='text'>sslerror: (8, 'EOF occurred in violation of protocol')</title><content type='html'>I have a program in the field that performs SOAP calls to a server over HTTPS.  The program works fine at most places. However, for one customer, the relevant call gives an error of&lt;br /&gt;&lt;br /&gt;&lt;b&gt;sslerror: (8, 'EOF occurred in violation of protocol')&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I started by taking a look at the stack trace on this guy:&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;Traceback (most recent call last):&lt;br /&gt;  File "/roadware/tire/custom/rt/dcpr", line 257, in main&lt;br /&gt;    products = q.getPrices(dealer=opts.dealer, customer_id=opts.customer, document_date=opts.date, pricing_type_id="1", products=opts.products)&lt;br /&gt;  File "/roadware/tire/custom/rt/dcpr", line 149, in getPrices&lt;br /&gt;    response = self.call(fullaction, gpelem, headerelem)&lt;br /&gt;  File "/usr/lib/python2.3/site-packages/elementsoap/ElementSOAP.py", line 209, in call&lt;br /&gt;    parser=namespace_parse&lt;br /&gt;  File "/usr/lib/python2.3/site-packages/elementsoap/HTTPClient.py", line 147, in do_request&lt;br /&gt;    h.endheaders()&lt;br /&gt;  File "/opt/K/SCO/python/2.3.4/usr/lib/python2.3/httplib.py", line 712, in endheaders&lt;br /&gt;    self._send_output()&lt;br /&gt;  File "/opt/K/SCO/python/2.3.4/usr/lib/python2.3/httplib.py", line 597, in _send_output&lt;br /&gt;    self.send(msg)&lt;br /&gt;  File "/opt/K/SCO/python/2.3.4/usr/lib/python2.3/httplib.py", line 564, in send&lt;br /&gt;    self.connect()&lt;br /&gt;  File "/opt/K/SCO/python/2.3.4/usr/lib/python2.3/httplib.py", line 985, in connect&lt;br /&gt;    ssl = socket.ssl(sock, self.key_file, self.cert_file)&lt;br /&gt;  File "/opt/K/SCO/python/2.3.4/usr/lib/python2.3/socket.py", line 73, in ssl&lt;br /&gt;    return _realssl(sock, keyfile, certfile)&lt;br /&gt;  sslerror: (8, 'EOF occurred in violation of protocol')&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Googling around for this problem suggests that proxies can result in this problem, which is likely caused by the HTTP header send being terminated prematurely.  A few people suggested using a different SSL library (M2Crypto), but my solution makes use of ElementSOAP, and I'd really rather not have to mess with that much of the underlying code.  So I took a look at the source of these Python packages:&lt;br /&gt;&lt;br /&gt;In HTTPClient.py:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="brush: python;"&gt;h.putrequest(method, path)&lt;br /&gt;h.putheader("User-Agent", self.user_agent)&lt;br /&gt;h.putheader("Host", self.host)&lt;br /&gt;h.putheader("Content-Type", content_type)&lt;br /&gt;h.putheader("Content-Length", str(len(body)))&lt;br /&gt;if extra_headers:&lt;br /&gt;    for key, value in extra_headers:&lt;br /&gt; h.putheader(key, value)&lt;br /&gt;h.endheaders()&lt;br /&gt;&lt;br /&gt;h.send(body)&lt;br /&gt;&lt;br /&gt;# fetch the reply&lt;br /&gt;errcode, errmsg, headers = h.getreply()&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;It looks like the header send is blowing up before the body of the SOAP message goes--we're not going to be able to just suppress the exception and take our response from the server.&lt;br /&gt;&lt;br /&gt;In ElementSOAP.py:&lt;br /&gt;&lt;pre name="code" class="brush: python;"&gt;# call the server&lt;br /&gt;try:&lt;br /&gt;    response = self.__client.do_request(&lt;br /&gt; ET.tostring(envelope),&lt;br /&gt; extra_headers=[("SOAPAction", action)],&lt;br /&gt; parser=namespace_parse&lt;br /&gt; )&lt;br /&gt;except HTTPError, v:&lt;br /&gt;    if v[0] == 500:&lt;br /&gt; # might be a SOAP fault&lt;br /&gt; response = namespace_parse(v[3])&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Well, this is interesting.  I'm not an expert on proxies or HTTP headers, but I see that &lt;b&gt;SOAPAction&lt;/b&gt; extra header getting sent, and I can envision a proxy stripping out that header before sending it on to it's final destination.  Result?  Headers in violation of protocol (according to IIS)?  Maybe.  However, the customer claims there is no proxy.  &lt;br /&gt;&lt;br /&gt;My next thought?  &lt;a href="http://sourceforge.net/tracker/?func=detail&amp;atid=387667&amp;aid=1831738&amp;group_id=26590"&gt;This post&lt;/a&gt; suggests changing the defaultHttpsTransport in client.py from&lt;br /&gt;httplib.HTTPConnection to M2Crypto.httpslib.HTTPSConnection.  Unfortunately, I'm working on SCO Openserver, so I don't know if I'll be able to build M2Crypto for this to work.  &lt;br /&gt;&lt;br /&gt;Instead, I tried to investigate the problem further.  On the non-functioning machine, I just tried to access the URL I am targeting using curl.  The result?&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;curl: (1) libcurl was built with SSL disabled, https: not supported!&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Really?  Well, just be be sure this would work at all, I tried it on a machine that didn't have the problem.&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;curl: (60) error setting certificate verify locations:&lt;br /&gt;  CAfile: /usr/share/curl/curl-ca-bundle.crt&lt;br /&gt;  CApath: none&lt;br /&gt;&lt;br /&gt;More details here: http://curl.haxx.se/docs/sslcerts.html&lt;br /&gt;&lt;br /&gt;curl performs SSL certificate verification by default, using a "bundle"&lt;br /&gt; of Certificate Authority (CA) public keys (CA certs). The default&lt;br /&gt; bundle is named curl-ca-bundle.crt; you can specify an alternate file&lt;br /&gt; using the --cacert option.&lt;br /&gt;If this HTTPS server uses a certificate signed by a CA represented in&lt;br /&gt; the bundle, the certificate verification probably failed due to a&lt;br /&gt; problem with the certificate (it might be expired, or the name might&lt;br /&gt; not match the domain name in the URL).&lt;br /&gt;If you'd like to turn off curl's verification of the certificate, use&lt;br /&gt; the -k (or --insecure) option.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Coincidence?  Or are we onto something?  I find another machine that hasn't been running this program, and try the curl command.&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;curl: (1) libcurl was built with SSL disabled, https: not supported!&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And the program gives &lt;b&gt;sslerror: (8, 'EOF occurred in violation of protocol')&lt;/b&gt; on this system.&lt;br /&gt;&lt;br /&gt;Maybe SSL isn't built the same on the failing machines?&lt;br /&gt;&lt;br /&gt;One more time, but on a different machine that is working.  This time, the curl command works.&lt;br /&gt;&lt;br /&gt;It turns out the failing systems are all running SCO Openserver 5.0.6, while the working systems are running SCO Openserver 5.0.7.  Maybe there's a problem with the SSL library installed on 5.0.6?  Or the Python installation on those?  Or something being used didn't have SSL compiled in, like curl?  So maybe the python wrapper calling the SSL library isn't getting what it should be getting out of the library, and then is sending something wrong to the server instead of notifying that something went wrong earlier.&lt;br /&gt;&lt;br /&gt;At this point, we've decided we are going to require 5.0.7 for this program, so I'm no longer actively researching a solution.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1986138544558251778-8580169124391372507?l=andrewgrossmanatwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewgrossmanatwork.blogspot.com/feeds/8580169124391372507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2009/02/sslerror-8-eof-occurred-in-violation-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/8580169124391372507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/8580169124391372507'/><link rel='alternate' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2009/02/sslerror-8-eof-occurred-in-violation-of.html' title='sslerror: (8, &apos;EOF occurred in violation of protocol&apos;)'/><author><name>Andrew</name><uri>http://www.blogger.com/profile/12129511239345013686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rF2F5Y-8aFY/SZREc5iiQII/AAAAAAAADnA/YQwd0K6s2MM/S220/IMG_0038+head.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1986138544558251778.post-6245230416627717373</id><published>2009-02-13T04:19:00.000-08:00</published><updated>2009-02-13T04:52:40.265-08:00</updated><title type='text'>Code Syntax Highlighting on Blogger</title><content type='html'>&lt;h4&gt;Summary:&lt;/h4&gt;  If you want your code formatted in a Blogger post, just add the following two lines to your template, before the &amp;lt;/body&amp;gt; tag.&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&amp;lt;script src=&amp;#x27;http://easy-blog-code-syntax-highlighting.googlecode.com/svn/trunk/ebcsh.js&amp;#x27; type=&amp;#x27;text/javascript&amp;#x27;/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;link href=&amp;#x27;http://www.geocities.com/easyblogcodesyntax/ebcsh.css&amp;#x27; rel=&amp;#x27;stylesheet&amp;#x27; type=&amp;#x27;text/css&amp;#x27;/&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Then, just wrap any code in &lt;i&gt;&amp;lt;pre&amp;gt;&lt;/i&gt; tags, &lt;b&gt;make sure&lt;/b&gt; you add the &lt;b&gt;name="code"&lt;/b&gt; attribute, and select the language you are formatting for in the class:&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&amp;lt;pre name="code" class="brush: c-sharp;"&amp;gt;&lt;br /&gt;function test() : String&lt;br /&gt;{&lt;br /&gt; return 10;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;becomes&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="brush: c-sharp;"&gt;&lt;br /&gt;function test() : String&lt;br /&gt;{&lt;br /&gt; return 10;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Explanation:&lt;/h4&gt;  The first order of business for this blog was getting code syntax highlighting working.  Not too difficult, there's a utility called &lt;a href="http://code.google.com/p/syntaxhighlighter/"&gt;SyntaxHighlighter&lt;/a&gt; that will do this in JavaScript, and instructions &lt;a href="http://azowebsphere.blogspot.com/2008/08/how-to-post-code-snippets-in-blogger.html"&gt;here&lt;/a&gt; and &lt;a href="http://hongjun.blogspot.com/2008/07/how-to-insert-code-snippet-on-blogger.html"&gt;here&lt;/a&gt; on making it work in Blogger.  Unfortunately, this still required hosting the Syntax Highlighter files somewhere, and adding some custom code from one of the above posts, or else Blogger adds visible &amp;lt;br/&amp;gt; tags to the line breaks in the code.&lt;br /&gt;&lt;br /&gt;So, I combined all the relevant JavaScript from the Syntax Highlighter project (built against 2.0.287), added the necessary code to remove the &amp;lt;br/&amp;gt; tags, and put that up on a &lt;a href="http://code.google.com/p/easy-blog-code-syntax-highlighting/"&gt;Google code project here&lt;/a&gt;.  Then I just linked to that file (ebcsh.js) directly out of the svn trunk.&lt;br /&gt;&lt;br /&gt;The css required a little more work, as Firefox refused to load css served from the Google Code's svn trunk.  Google served the file with a MIME type of  "text/plain", instead of "text/css", so I dialed up 1997 for some swanky free Geocities hosting.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1986138544558251778-6245230416627717373?l=andrewgrossmanatwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewgrossmanatwork.blogspot.com/feeds/6245230416627717373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2009/02/code-syntax-highlighting-on-blogger.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/6245230416627717373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1986138544558251778/posts/default/6245230416627717373'/><link rel='alternate' type='text/html' href='http://andrewgrossmanatwork.blogspot.com/2009/02/code-syntax-highlighting-on-blogger.html' title='Code Syntax Highlighting on Blogger'/><author><name>Andrew</name><uri>http://www.blogger.com/profile/12129511239345013686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://4.bp.blogspot.com/_rF2F5Y-8aFY/SZREc5iiQII/AAAAAAAADnA/YQwd0K6s2MM/S220/IMG_0038+head.png'/></author><thr:total>4</thr:total></entry></feed>
