Hi BinĂ¡ris,
On 22 March 2012 07:08, BinĂ¡ris wikiposta@gmail.com wrote:
Merlijn copied "open in browser" from replace.py to add_text.py: http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10034 Just a day before I was to do the same with solve_disambiguation.py, but I had no time yet. What about rather introducing a browseropen() method to class Page?
yes/no: we should indeed have a single function to open a browser for a certain Page object, but I think it shouldn't be a function /in/ the Page object, but rather a 'helper' function somewhere (as it doesn't actually do anything with the object except getting the url). So something like: pywikibot.utils.openbrowser(Page(...)).
I think any error message during this process shall appear in webbrowser, not the pywiki script, am I right?
I'm not sure what you mean with this. It just opens the url in a browser; if the url does not exist, this will give you an error message in the browser. But apart from the url, there is no communication between the bot and the browser (so for instance it won't give you a window with the applied changes). Does this answer your question?
Best, Merlijn