<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PPyA: Python Assembler</title>
	<atom:link href="http://probablyprogramming.com/2008/04/18/ppya-python-assembler/feed/" rel="self" type="application/rss+xml" />
	<link>http://probablyprogramming.com/2008/04/18/ppya-python-assembler/</link>
	<description>It&#039;s what I&#039;m doing, and what posts on this blog are about.</description>
	<lastBuildDate>Sat, 05 Jun 2010 21:26:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Probably Programming &#187; Blog Archive &#187; 500 Programming Languages: Python</title>
		<link>http://probablyprogramming.com/2008/04/18/ppya-python-assembler/comment-page-1/#comment-14774</link>
		<dc:creator>Probably Programming &#187; Blog Archive &#187; 500 Programming Languages: Python</dc:creator>
		<pubDate>Sat, 01 Aug 2009 17:53:57 +0000</pubDate>
		<guid isPermaLink="false">http://probablyprogramming.com/?p=74#comment-14774</guid>
		<description>&lt;p&gt;[...] require a bit more code and ruin the simplicity of it all. I could also have generated input for my Python assembler, and used that to generate a compiled .pyc file, but like I said, I was going for simplicity here, [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] require a bit more code and ruin the simplicity of it all. I could also have generated input for my Python assembler, and used that to generate a compiled .pyc file, but like I said, I was going for simplicity here, [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: pib</title>
		<link>http://probablyprogramming.com/2008/04/18/ppya-python-assembler/comment-page-1/#comment-951</link>
		<dc:creator>pib</dc:creator>
		<pubDate>Tue, 10 Jun 2008 23:42:00 +0000</pubDate>
		<guid isPermaLink="false">http://probablyprogramming.com/?p=74#comment-951</guid>
		<description>&lt;p&gt;@steve:&lt;/p&gt;

&lt;p&gt;No, sadly there&#039;s no way to get a .py file using Papaya, since it is just a &lt;em&gt;disassembler&lt;/em&gt;, not a &lt;em&gt;decompiler&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;What papaya outputs is a representation of the actual bytecodes of the Python virtual machine.&lt;/p&gt;

&lt;p&gt;In theory it would be possible to generate a .py file from a .pyc file, but I don&#039;t think I want to be the one to try it.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@steve:</p>

<p>No, sadly there&#8217;s no way to get a .py file using Papaya, since it is just a <em>disassembler</em>, not a <em>decompiler</em>.</p>

<p>What papaya outputs is a representation of the actual bytecodes of the Python virtual machine.</p>

<p>In theory it would be possible to generate a .py file from a .pyc file, but I don&#8217;t think I want to be the one to try it.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: steve</title>
		<link>http://probablyprogramming.com/2008/04/18/ppya-python-assembler/comment-page-1/#comment-950</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Tue, 10 Jun 2008 19:20:31 +0000</pubDate>
		<guid isPermaLink="false">http://probablyprogramming.com/?p=74#comment-950</guid>
		<description>&lt;p&gt;hi...
ahmm...i&#039;m not a python developer and am actually trying to use ppya to &#039;decompyle&#039; a python script. would it be possible for u to explain to a rookie whats the difference of the resulting .pya and a .py file and if is it possible to get to a .py file which is a bit more readable than the .pya ?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>hi&#8230;
ahmm&#8230;i&#8217;m not a python developer and am actually trying to use ppya to &#8216;decompyle&#8217; a python script. would it be possible for u to explain to a rookie whats the difference of the resulting .pya and a .py file and if is it possible to get to a .py file which is a bit more readable than the .pya ?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: things to look at (april 14th - april 21st) &#124; stimulant - changing things around. . .</title>
		<link>http://probablyprogramming.com/2008/04/18/ppya-python-assembler/comment-page-1/#comment-519</link>
		<dc:creator>things to look at (april 14th - april 21st) &#124; stimulant - changing things around. . .</dc:creator>
		<pubDate>Tue, 22 Apr 2008 02:22:32 +0000</pubDate>
		<guid isPermaLink="false">http://probablyprogramming.com/?p=74#comment-519</guid>
		<description>&lt;p&gt;[...] PIBlog &#187; Blog Archive &#187; PPyA: Python Assembler [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] PIBlog &raquo; Blog Archive &raquo; PPyA: Python Assembler [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: pib</title>
		<link>http://probablyprogramming.com/2008/04/18/ppya-python-assembler/comment-page-1/#comment-513</link>
		<dc:creator>pib</dc:creator>
		<pubDate>Sat, 19 Apr 2008 04:35:31 +0000</pubDate>
		<guid isPermaLink="false">http://probablyprogramming.com/?p=74#comment-513</guid>
		<description>&lt;p&gt;@Phillip: I know I could have used the BytecodeAssembler module for a lot of what I wrote, but for educational purposes, I wanted to write the whole thing from scratch. I very well might convert Papaya over to using that module, now that I&#039;ve gotten the aforementioned education out of it. If I do that, though, my code will be really short!&lt;/p&gt;

&lt;p&gt;@Thomas: I do know about using for .. in, and that was what I was using originally, in fact. The reason that I switched it to the ugly way it is written now is because the encode_op method will pass the input generator into a recursive call of the asm method...and I thought that it wouldn&#039;t work to do it the pretty way.&lt;/p&gt;

&lt;p&gt;Of course, I just checked and you can, in fact have nested for loops on the same generator and it will work the same way. Well, that will look much better after fixing that, thanks!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Phillip: I know I could have used the BytecodeAssembler module for a lot of what I wrote, but for educational purposes, I wanted to write the whole thing from scratch. I very well might convert Papaya over to using that module, now that I&#8217;ve gotten the aforementioned education out of it. If I do that, though, my code will be really short!</p>

<p>@Thomas: I do know about using for .. in, and that was what I was using originally, in fact. The reason that I switched it to the ugly way it is written now is because the encode_op method will pass the input generator into a recursive call of the asm method&#8230;and I thought that it wouldn&#8217;t work to do it the pretty way.</p>

<p>Of course, I just checked and you can, in fact have nested for loops on the same generator and it will work the same way. Well, that will look much better after fixing that, thanks!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas Lee</title>
		<link>http://probablyprogramming.com/2008/04/18/ppya-python-assembler/comment-page-1/#comment-512</link>
		<dc:creator>Thomas Lee</dc:creator>
		<pubDate>Sat, 19 Apr 2008 04:17:17 +0000</pubDate>
		<guid isPermaLink="false">http://probablyprogramming.com/?p=74#comment-512</guid>
		<description>&lt;p&gt;Hi Paul,&lt;/p&gt;

&lt;p&gt;In the main assembler loop:&lt;/p&gt;

&lt;p&gt;while True:
  try:
    op = input.next()
  except StopIteration:
    break
  # ...&lt;/p&gt;

&lt;p&gt;can be replaced with this:&lt;/p&gt;

&lt;p&gt;for op in input:
  # ...&lt;/p&gt;

&lt;p&gt;(I tried to send you a small patch regarding this, but it seems my local SMTP server needs some more configuration before it will play nice with git-send-email)&lt;/p&gt;

&lt;p&gt;This is a somewhat more &quot;Pythonic&quot; way to deal with your input. You can use &quot;for&quot; with any sequence or generator. Generators are especially funky. I&#039;ve found them frequently useful. I&#039;m actually writing up a post on how the Python compiler constructs generator functions: syntactically they look just like functions, but under the hood there&#039;s a bit of voodoo going on :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Paul,</p>

<p>In the main assembler loop:</p>

<p>while True:
  try:
    op = input.next()
  except StopIteration:
    break
  # &#8230;</p>

<p>can be replaced with this:</p>

<p>for op in input:
  # &#8230;</p>

<p>(I tried to send you a small patch regarding this, but it seems my local SMTP server needs some more configuration before it will play nice with git-send-email)</p>

<p>This is a somewhat more &#8220;Pythonic&#8221; way to deal with your input. You can use &#8220;for&#8221; with any sequence or generator. Generators are especially funky. I&#8217;ve found them frequently useful. I&#8217;m actually writing up a post on how the Python compiler constructs generator functions: syntactically they look just like functions, but under the hood there&#8217;s a bit of voodoo going on <img src='http://probablyprogramming.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>]]></content:encoded>
	</item>
	<item>
		<title>By: Phillip J. Eby</title>
		<link>http://probablyprogramming.com/2008/04/18/ppya-python-assembler/comment-page-1/#comment-511</link>
		<dc:creator>Phillip J. Eby</dc:creator>
		<pubDate>Fri, 18 Apr 2008 22:08:17 +0000</pubDate>
		<guid isPermaLink="false">http://probablyprogramming.com/?p=74#comment-511</guid>
		<description>&lt;p&gt;You know, if you use the BytecodeAssembler module ( http://pypi.python.org/pypi/BytecodeAssembler ), you won&#039;t need to figure out the stack stuff.  For that matter, it has lots of support for labels, block handling, etc.  The full manual for it is at http://peak.telecommunity.com/DevCenter/BytecodeAssembler .&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>You know, if you use the BytecodeAssembler module ( <a href="http://pypi.python.org/pypi/BytecodeAssembler" rel="nofollow">http://pypi.python.org/pypi/BytecodeAssembler</a> ), you won&#8217;t need to figure out the stack stuff.  For that matter, it has lots of support for labels, block handling, etc.  The full manual for it is at <a href="http://peak.telecommunity.com/DevCenter/BytecodeAssembler" rel="nofollow">http://peak.telecommunity.com/DevCenter/BytecodeAssembler</a> .</p>]]></content:encoded>
	</item>
	<item>
		<title>By: pib</title>
		<link>http://probablyprogramming.com/2008/04/18/ppya-python-assembler/comment-page-1/#comment-510</link>
		<dc:creator>pib</dc:creator>
		<pubDate>Fri, 18 Apr 2008 21:14:45 +0000</pubDate>
		<guid isPermaLink="false">http://probablyprogramming.com/?p=74#comment-510</guid>
		<description>&lt;p&gt;I suppose I could do that, but I think there are some other programs out there already called Papaya.&lt;/p&gt;

&lt;p&gt;Plus, with PPya, I could also make it a recursive acronym along the lines of &quot;PPya: Python assembler.&quot;&lt;/p&gt;

&lt;p&gt;Wait, I&#039;ve got it, PPya now stands for &quot;Papaya Python assembler.&quot;&lt;/p&gt;

&lt;p&gt;It&#039;s not a recursive acronym, it&#039;s an acronym with a sound-alike first word.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I suppose I could do that, but I think there are some other programs out there already called Papaya.</p>

<p>Plus, with PPya, I could also make it a recursive acronym along the lines of &#8220;PPya: Python assembler.&#8221;</p>

<p>Wait, I&#8217;ve got it, PPya now stands for &#8220;Papaya Python assembler.&#8221;</p>

<p>It&#8217;s not a recursive acronym, it&#8217;s an acronym with a sound-alike first word.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Jim</title>
		<link>http://probablyprogramming.com/2008/04/18/ppya-python-assembler/comment-page-1/#comment-509</link>
		<dc:creator>Jim</dc:creator>
		<pubDate>Fri, 18 Apr 2008 19:35:46 +0000</pubDate>
		<guid isPermaLink="false">http://probablyprogramming.com/?p=74#comment-509</guid>
		<description>&lt;p&gt;Why not &lt;em&gt;actually&lt;/em&gt; call it Papaya?  Acronyms aren&#039;t mandatory.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Why not <em>actually</em> call it Papaya?  Acronyms aren&#8217;t mandatory.</p>]]></content:encoded>
	</item>
</channel>
</rss>
