Alison,<div> I'm not familiar with your package, so I'm sure others will be able to help give more details on why this is set up this way. But, let me tell you what an __init__.py file is. Also, I can show you how to get started in the short term.</div>
<div><br></div><div> A module in python is almost like a directory (on your python path). For example, lets say we have a directory like this:</div><div><br></div><div>my_cool_module</div><div> my_cool_file1.py</div>
<div> my_cool_file2.py</div><div><br></div><div>Now, it'd be very "cool" if I could do this:</div><div><br></div><div>from <a href="http://my_cool_module.my_cool_file1.py">my_cool_module.my_cool_file1.py</a> import my_cool_function</div>
<div><br></div><div>(okay forgive my bad naming and overuse of the word 'cool' :)</div><div><br></div><div>This won't work without a __init__.py file inside:</div><div><br></div><div><div>my_cool_module</div><div>
__init__.py</div><div> my_cool_file1.py</div><div> my_cool_file2.py</div></div><div><br></div><div>You can almost think of it as a "directory" of your module files. Now, the file doesn't have to have any python code it it (but it can if you really want to do some special things). It only has to exist.</div>
<div><br></div><div>With all that said, I'm not sure what your __init__.<a href="http://py.in">py.in</a> file contains. It may be an empty file. However, to use any module, you need to have an __init__.py file.</div><div>
<br></div><div>So, it may be as simple as:</div><div><br></div><div>cp __init__.<a href="http://py.in">py.in</a> __init__.py</div><div><br></div><div>Or, if there's nothing in the file, simply creating a blank one will let you move on:</div>
<div><br></div><div>touch __init__.py</div><div><br></div><div><br></div><div>This doesn't get you totally out of the weeds. But, hopefully it helps a little.</div><div><br></div><div><br></div><div>Warmest Regards,</div>
<div><br></div><div><br></div><div>Glen Jarvis</div><div><br></div><div><br><br><div class="gmail_quote">On Thu, Nov 12, 2009 at 11:22 AM, Alison Chaiken <span dir="ltr"><<a href="mailto:alchaiken@gmail.com">alchaiken@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Sorry for this newbie question, but I'm stumped. I'd like to use<br>
package pyatspi, which comes with (among other things) a file called<br>
__init__.<a href="http://py.in" target="_blank">py.in</a>. The instructions for installation say to run<br>
"python setup.py install" as expected. However "python setup.py<br>
install" and "python setup.py build" give me the error<br>
<br>
running build<br>
running build_py<br>
package init file '__init__.py' not found (or not a regular file)<br>
package init file '__init__.py' not found (or not a regular file)<br>
<br>
Well yeah, the svn download doesn't provide an __init__.py file, so I<br>
don't have one!<br>
<br>
What step am I missing here? How do I turn __init__.<a href="http://py.in" target="_blank">py.in</a> into<br>
__init__.py? I can't find the answer in G****e.<br>
<br>
Alternatively, what I wish to do is to use pyatspi to switch linux<br>
desktop screens under programmatic control. Is there a more<br>
recommended package that provides this capability.<br>
<br>
Thanks,<br>
Alison<br>
<br>
<br>
--<br>
Alison Chaiken<br>
(650) 279-5600 (cell)<br>
<a href="http://www.exerciseforthereader.org/" target="_blank">http://www.exerciseforthereader.org/</a><br>
The revolution will be automated. -- David E. Calkins, riffing on<br>
Gil Scott-Heron's "The revolution will not be televised."<br>
Sent from Stanford, CA, United States<br>
_______________________________________________<br>
Baypiggies mailing list<br>
<a href="mailto:Baypiggies@python.org">Baypiggies@python.org</a><br>
To change your subscription options or unsubscribe:<br>
<a href="http://mail.python.org/mailman/listinfo/baypiggies" target="_blank">http://mail.python.org/mailman/listinfo/baypiggies</a><br>
</blockquote></div><br></div>