On 5/23/05, <b class="gmail_sendername">Joseph Quigley</b> &lt;<a href="mailto:cpu.crazy@gmail.com">cpu.crazy@gmail.com</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I've seen many (python) &quot;plugins&quot; (some located in site-packages [windows<br>here]) with the name __init__.py.<br>What's their use?<br>class foo:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def __init__:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;this starts first&quot;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def foo1():<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print
&quot;this comes later. Init initializes the chain of functions in this<br>class<br><br>Now, i've never used a program (i can't seem to grasp all the self, and<br>other things in OOP yet) with __init__ but I know what __init__ does in a
<br>class, not as a file name.<br>I'm asking this out of curiosity, not for help.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;JQ</blockquote><div><br>
__init__.py will be executed when a package is imported.<br>
</div><br></div>