<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Piece of Py(thon) - Latest Comments</title><link xmlns="http://www.w3.org/2005/Atom" rel="http://api.friendfeed.com/2008/03#sup" href="http://disqus.com/sup/all.sup#forumcomments-158317e7" type="application/json"/><link>http://pieceofpy.disqus.com/</link><description>Python, agile, and misc tech ramblings.</description><atom:link href="http://pieceofpy.disqus.com/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 25 Apr 2012 00:03:37 -0000</lastBuildDate><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/2012/01/10/working-with-pyramid-and-ming#comment-508454082</link><description>&lt;p&gt;Hello, I have a question. do you know if there are any book about pyramid? &lt;br&gt;If I follow the examples with pylons can It help me to learn pyramid?&lt;/p&gt;

&lt;p&gt;thanks you.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Israel B. Aceves</dc:creator><pubDate>Wed, 25 Apr 2012 00:03:37 -0000</pubDate></item><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/2011/10/12/sqlalchemy-custom-types-integers-datetime#comment-480690202</link><description>&lt;p&gt;Nice! :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ralphbean</dc:creator><pubDate>Fri, 30 Mar 2012 08:34:28 -0000</pubDate></item><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/2011/10/13/sqlalchemy-cleanup-challenge#comment-335090161</link><description>&lt;p&gt;I'm not fluent with SQL Alchemy, but is it possible to group by based on a custom Python function? A unix timestamp has a range of about 12*137 months; an array could be created with the timestamps of the month starts, and the group_by value could be provided by the index in the array, said index discovered by a bisect.bisect lookup. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Χρήστος Γεωργίου</dc:creator><pubDate>Fri, 14 Oct 2011 20:52:54 -0000</pubDate></item><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/2011/10/12/sqlalchemy-custom-types-integers-datetime#comment-333324106</link><description>&lt;p&gt;yeah i wish Ralph had asked me about that, he did a nice job figuring out the reflection part, but he should have gone with TypeDecorator in his approach instead of adapting at the mapper level.  He already had a hook into where the type gets set on the Table and he can put it right there !&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">zzzeek</dc:creator><pubDate>Wed, 12 Oct 2011 23:37:15 -0000</pubDate></item><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/blog/2011/10/05/working-for-geeknet#comment-327269093</link><description>&lt;p&gt;I wasn't even aware that sourceforge had SVN!&lt;/p&gt;

&lt;p&gt;I can honestly not recall ever really seeing SF tooting its own horn, which is kind of surprising what with geeknet also owning slashdot you'd think new/updated features would show up on their sister site more frequently.&lt;/p&gt;

&lt;p&gt;Hell, what with berlios shuttering at the end of this year, sourceforge should be going all out to market itself as the best candidate platform to migrate to.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Chris Ashurst</dc:creator><pubDate>Wed, 05 Oct 2011 13:07:39 -0000</pubDate></item><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/blog/2011/10/05/working-for-geeknet#comment-327193791</link><description>&lt;p&gt;Great to have you officially on board now, WWIII!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rick Copeland</dc:creator><pubDate>Wed, 05 Oct 2011 11:09:48 -0000</pubDate></item><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/blog/2011/08/05/hooking-up-whoosh-and-sqlalchemy-(sawhoosh)#comment-298768566</link><description>&lt;p&gt;Thanks Robert, I correct the issue. I made the id columns of the models Unicode type and also ensured that index and deindex are using the unicode ID (which is now set to oid, instead of the reserved word id).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Wayne Witzel III</dc:creator><pubDate>Tue, 30 Aug 2011 12:33:08 -0000</pubDate></item><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/blog/2011/08/05/hooking-up-whoosh-and-sqlalchemy-(sawhoosh)#comment-298664201</link><description>&lt;p&gt;great writeup. I found a bug in SawhooshBase: In reindex and deindex you do not actually use the unicode-formatted id, but &lt;a href="http://self.id" rel="nofollow"&gt;self.id&lt;/a&gt; (which won't work if &lt;a href="http://self.id" rel="nofollow"&gt;self.id&lt;/a&gt; cannot be forced to unicode).&lt;br&gt;regards&lt;br&gt;robert&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Robert Forkel</dc:creator><pubDate>Tue, 30 Aug 2011 09:21:48 -0000</pubDate></item><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/blog/2011/08/05/hooking-up-whoosh-and-sqlalchemy-(sawhoosh)#comment-280460813</link><description>&lt;p&gt;It depends, if you are using the results for auto-completion and the results are coming from multiple tables and you are doing full table scans to locate the results, then yes, you would benefit from a search index for your data.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Wayne Witzel III</dc:creator><pubDate>Mon, 08 Aug 2011 11:20:45 -0000</pubDate></item><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/blog/2011/08/05/hooking-up-whoosh-and-sqlalchemy-(sawhoosh)#comment-279597917</link><description>&lt;p&gt;That's great!! I am currently working on a pyramid project. I am new to python and this is the first time I hear of whoosh. Your code approach is great and I might use it on my project. :)&lt;/p&gt;

&lt;p&gt;I currently directly query the database for "ajax autocomplete" searches, and I wonder if it is a better approach to use a search index for example whoosh insteaad of querying the sqlalchemy models. What do you think?&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ahmed Bassiouni</dc:creator><pubDate>Sun, 07 Aug 2011 00:29:55 -0000</pubDate></item><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/blog/2011/07/24/pyramid-and-velruse-for-google-authentication#comment-276754575</link><description>&lt;p&gt;Your git branch  is not working. I am getting error like appmaker.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Krish</dc:creator><pubDate>Wed, 03 Aug 2011 23:16:37 -0000</pubDate></item><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/blog/2011/08/01/pyramid-and-traversal-with-a-restful-interface#comment-274707959</link><description>&lt;p&gt;It's a pattern we've been using for some years in Zope-land of course. &lt;/p&gt;

&lt;p&gt;So I use patterns like this all the time with Grok. Actually with Grok I often use a library I wrote called traject, which allows you to combine traversal with routing. You *route* to the context, which makes it easy to plug in things like SQLAlchemy queries, and then in the last step the context-aware view is looked up. It shouldn't be too difficult to integrate traject with Pyramid.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://pypi.python.org/pypi/traject" rel="nofollow"&gt;http://pypi.python.org/pypi/tr...&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You still make the same extra db calls though even with Traject. But in reality with a well-designed URL space one would frequently need the collection in any case even if you're just accessing an item in it.&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Martijn Faassen</dc:creator><pubDate>Tue, 02 Aug 2011 12:37:19 -0000</pubDate></item><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/blog/2011/08/01/pyramid-and-traversal-with-a-restful-interface#comment-273165348</link><description>&lt;p&gt;where is +1&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kenny Garland</dc:creator><pubDate>Mon, 01 Aug 2011 17:27:21 -0000</pubDate></item><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/blog/2011/07/28/pycodeconf-2011#comment-267426870</link><description>&lt;p&gt;Absolutely, come on down :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Wayne Witzel III</dc:creator><pubDate>Thu, 28 Jul 2011 01:51:20 -0000</pubDate></item><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/blog/2011/07/28/pycodeconf-2011#comment-267422996</link><description>&lt;p&gt;So you're saying I can crash at your place?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jackdied</dc:creator><pubDate>Thu, 28 Jul 2011 01:46:39 -0000</pubDate></item><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/blog/2011/07/24/pyramid-and-velruse-for-google-authentication#comment-263738223</link><description>&lt;p&gt;jackdied That is exactly why I created velruse. It *can* do Google OpenID+OAuth hybrid login to gain access to services as well as login, and it was a huge HUGE pain in the butt to figure out. I had to read most of the oauth lib code I was using to see how to get the right commands in. Facebook OAuth2 in comparison was a breeze (which velruse also does). Yahoo's OpenID+OAuth of course works differently than Google's, which took more time to handle properly.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ben Bangert</dc:creator><pubDate>Mon, 25 Jul 2011 15:46:25 -0000</pubDate></item><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/blog/2011/07/24/pyramid-and-velruse-for-google-authentication#comment-262667980</link><description>&lt;p&gt;I'm working up a post on OAuth2, which is less mature than OAuth 1.  I'm somewhere between frustrated and angry about all the implementations of OAuth2.&lt;/p&gt;

&lt;p&gt;Interop of 1.x libraries is pretty good.  The interoperability of 2.x libraries is terrible - if you aren't using the blessed client for one particular site then things just plain don't work.  The lack of interop is somewhat understandable because for many of the modes there wasn't even a draft RFC until this year.  There isn't really an approved standard, there is just what people do.&lt;/p&gt;

&lt;p&gt;As an end user the situation sucks.  I have to use a different library to interface with each service.  I've spent four days trying to work around the google-python-api-client which is just some of the worst mess of code you've ever seen.   But I can't make it work because it only accepts requests made by that mess, and it throws opaque errors if you give it something that merely obeys the standard.&lt;/p&gt;

&lt;p&gt;Arghh.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jackdied</dc:creator><pubDate>Sun, 24 Jul 2011 02:54:10 -0000</pubDate></item><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/2011/01/24/validate-all-items-in-a-sequence#comment-134358311</link><description>&lt;p&gt;Yeah, makes sense. I know about generator expressions, but seem to routinely overlook use cases for them like this. Thanks :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Wayne Witzel III</dc:creator><pubDate>Tue, 25 Jan 2011 11:56:32 -0000</pubDate></item><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/2011/01/24/validate-all-items-in-a-sequence#comment-134241484</link><description>&lt;p&gt;Works fine in 2.5 where both generator expressions and "all" were introduced.&lt;/p&gt;

&lt;p&gt;But yes, I was going to suggest the same thing. Generator expressions and list comprehensions make map obsolete (although I still like it for some purposes).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael Foord</dc:creator><pubDate>Tue, 25 Jan 2011 04:28:23 -0000</pubDate></item><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/2011/01/24/validate-all-items-in-a-sequence#comment-134213388</link><description>&lt;p&gt;Even better, if you have a recent Python (&amp;gt;= 2.6, I believe):&lt;/p&gt;

&lt;p&gt;&amp;gt;&amp;gt;&amp;gt; all(x &amp;gt; 10 for x in xrange(1, 20))&lt;br&gt;False&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; all(x &amp;gt; 10 for x in xrange(20, 30))&lt;br&gt;True&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Ward</dc:creator><pubDate>Tue, 25 Jan 2011 02:50:05 -0000</pubDate></item><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/2010/12/29/city-and-state-lookup-from-zipcode#comment-120926607</link><description>&lt;p&gt;Well that would of ruined my fun of using Sniffer for the first time. Plus I didn't make the choice of data provider I was just given the files and told to make it so.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Wayne Witzel III</dc:creator><pubDate>Wed, 29 Dec 2010 19:17:30 -0000</pubDate></item><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/2010/12/29/city-and-state-lookup-from-zipcode#comment-120816448</link><description>&lt;p&gt;Take a look at these guys: &lt;a href="http://www.zipcodedownload.com/" rel="nofollow"&gt;http://www.zipcodedownload.com...&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;They provide all updates in multiple formats, eliminating the need for any conversions.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MaestroMike</dc:creator><pubDate>Wed, 29 Dec 2010 14:30:41 -0000</pubDate></item><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/2010/12/28/looking-for-work#comment-120273135</link><description>&lt;p&gt;You can email me at wayne@pieceofpy.com&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Wayne Witzel III</dc:creator><pubDate>Tue, 28 Dec 2010 15:56:31 -0000</pubDate></item><item><title>Re: Piece Of Py(thon)</title><link>http://pieceofpy.com/2010/12/28/looking-for-work#comment-120258581</link><description>&lt;p&gt;How does a person get in touch with you?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">matthew</dc:creator><pubDate>Tue, 28 Dec 2010 15:32:06 -0000</pubDate></item></channel></rss>
