Like Like Like!<br>I never figured out of to get pywikipedia to run automatically, and now my shell throws me a "disk quota exceeded" message. ¬¬<br><br>Diego<br><br><div class="gmail_quote">2011/4/22 MZMcBride <span dir="ltr"><<a href="mailto:z@mzmcbride.com">z@mzmcbride.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">Junaid P V wrote:<br>
> I am trying to schedule a pywikipedia bot, but could not do it..<br>
><br>
> I get the error:<br>
> import wikipedia<br>
> ImportError: No module named wikipedia<br>
><br>
> How can I specify working directory for the program. I googled and tried<br>
> several arguments but not worked.<br>
> (It is first time I try to schedule a job)<br>
><br>
> Could someone help me?<br>
<br>
</div>What are you using to "schedule" the bot? cron? You probably just need to<br>
set your PYTHONPATH somewhere.<br>
<br>
For pywikipedia, this means that if your pywikipedia directory is at<br>
/home/user/scripts/pywikipedia, you'd put something like this in cron:<br>
<br>
0 1 2 3 4 PYTHONPATH=$HOME/scripts/pywikipedia python $HOME/vandalize.py<br>
<br>
If you're using qsub, you can set PYTHONPATH in an .environment file in your<br>
home directory.<br>
<br>
There might be a purely Pythonic way to do this as well. Just google around<br>
a bit and you should be able to figure it out.<br>
<br>
MZMcBride<br>
<br>
<br>
<br>
_______________________________________________<br>
Toolserver-l mailing list (<a href="mailto:Toolserver-l@lists.wikimedia.org">Toolserver-l@lists.wikimedia.org</a>)<br>
<a href="https://lists.wikimedia.org/mailman/listinfo/toolserver-l" target="_blank">https://lists.wikimedia.org/mailman/listinfo/toolserver-l</a><br>
Posting guidelines for this list: <a href="https://wiki.toolserver.org/view/Mailing_list_etiquette" target="_blank">https://wiki.toolserver.org/view/Mailing_list_etiquette</a><br>
</blockquote></div><br>