The first line of pywki moduls is: #!/usr/bin/python Elsewhere I see #! /usr/bin/env/python, and (as far as I remember) this is stated at docs.python.org, too. What is the difference? Forgive me this question, I am a Windows-user. Is it just a user habit, where do you put your Python? Is any of these more canonical?
The second line is usually: # -*- coding: utf-8 -*- Elsewhere I see #coding: utf-8 Is there any difference?
Inline answers...
Am 22.09.2010 10:07, schrieb Bináris:
The first line of pywki moduls is: #!/usr/bin/python Elsewhere I see #! /usr/bin/env/python, and (as far as I remember) this is stated at docs.python.org http://docs.python.org, too. What is the difference? Forgive me this question, I am a Windows-user. Is it just a user habit, where do you put your Python? Is any of these more canonical?
Yes, it's a matter of where python is put. This may differ from distro to distro (in windows even from version to version ;)). But is not that critical since ofter there are additional (sym) links, e.g. This comment can also be omitted completely, but then you will have to use: python script.py to run your script. It has more or less the same function, as assigning an applictaion to a file type in windows. So you can omitt the 'python' in the script call...
The second line is usually: # -*- coding: utf-8 -*- Elsewhere I see #coding: utf-8 Is there any difference?
Just a guess; I think important is to have 'coding: utf-8' since it is put into a comment anyway ;) Personally I feel more comfortable with the first version.
Greetings
Every time I get this message: "WARNING: Could not open 'http://en.wikipedia.org/w/api.php'. Maybe the server or your connection is down. Retrying in 1 minutes..." , is it possible to change the time to retry connecting? about 10 seconds? I'm trying to do some edits now and the server is getting down every 5 minutes, so the bot is stopping.
Regards.
Lucas.
Hi Lucas,
Op 25-9-2010 1:22, Lucas Nunes schreef:
Every time I get this message: "WARNING: Could not open 'http://en.wikipedia.org/w/api.php'. Maybe the server or your connection is down. Retrying in 1 minutes..." , is it possible to change the time to retry connecting? about 10 seconds? I'm trying to do some edits now and the server is getting down every 5 minutes, so the bot is stopping.
The api is overloaded. Hammering it with bots is not going to help.
Maarten
Regards.
Lucas.
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
pywikipedia-l@lists.wikimedia.org