<br><br><div class="gmail_quote">On Mon, Aug 24, 2009 at 7:39 AM, Nick Coghlan <span dir="ltr">&lt;<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Guido van Rossum wrote:<br>
&gt; Anyway it looks like if someone wants to try this, only the code in<br>
&gt; runpy.py needs to be touched.<br>
<br>
</div>The necessary work would actually be in zipimport. runpy doesn&#39;t know<br>
anything about the details of where the module code comes from, it just<br>
asks the relevant importer for the details. For zipfile and directory<br>
execution, they get added to the start of sys.path and then runpy is<br>
invoked to look for the module &quot;__main__&quot;. From that point on most of<br>
the heavy lifting is handled by the regular import machinery (aside from<br>
using the pkgutil emulation for the basic import behaviour that isn&#39;t<br>
fully exposed by the imp module).<br>
<br>
I added a -1 to the tracker issue as well. That&#39;s due both to my opinion<br>
on the inherent idiocy of DRM though (since shared secrets don&#39;t provide<br>
any security when the attacker in your threat model is one of the people<br>
you are sharing the secret with) and to the fact that associating<br>
passwords with the relevant zipfile entries on sys.path would get messy<br>
fairly quickly.<br>
<br>
Cheers.<br>
Nick.<br>
<br>
--<br>
Nick Coghlan   |   <a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>   |   Brisbane, Australia<br>
---------------------------------------------------------------<br>
<div class="im">_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-dev" target="_blank">http://mail.python.org/mailman/listinfo/python-dev</a><br>
</div>Unsubscribe: <a href="http://mail.python.org/mailman/options/python-dev/shashank.sunny.singh%40gmail.com" target="_blank">http://mail.python.org/mailman/options/python-dev/shashank.sunny.singh%40gmail.com</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Regards<br>Shashank Singh<br>Senior Undergraduate, Department of Computer Science and Engineering<br>Indian Institute of Technology Bombay<br><a href="mailto:shashank.sunny.singh@gmail.com">shashank.sunny.singh@gmail.com</a><br>
<a href="http://www.cse.iitb.ac.in/~shashanksingh">http://www.cse.iitb.ac.in/~shashanksingh</a><br>