Re: [Pywikipedia-l] Propose to create another function to login

2014-01-24 Thread Merlijn van Deen
Hi Sorawee, On 24 January 2014 02:09, Sorawee Porncharoenwase wrote: > I think that we should have a function which tries to login and return the > status whether that logging in is successful. What we currently do (for > example in APISite.deletepage()) is that we "try: site.login(sysop=True) >

Re: [Pywikipedia-l] Propose to create another function to login

2014-01-23 Thread John
If you look in compat you have the functions you want and loggedinas isnt depreciated On Thu, Jan 23, 2014 at 8:23 PM, Sorawee Porncharoenwase < nullzero.f...@gmail.com> wrote: > I don't think loggedInAs() has the same functionality as I proposed. First > of all, it is deprecated. In addition, it

Re: [Pywikipedia-l] Propose to create another function to login

2014-01-23 Thread Sorawee Porncharoenwase
I don't think loggedInAs() has the same functionality as I proposed. First of all, it is deprecated. In addition, it just return self.logged_in(sysop) and self.user(), and neither self.logged_in(sysop) nor self.user() does login. On Thu, Jan 23, 2014 at 8:13 PM, John wrote: > See site.loggedInA

Re: [Pywikipedia-l] Propose to create another function to login

2014-01-23 Thread John
See site.loggedInAs() On Thu, Jan 23, 2014 at 8:09 PM, Sorawee Porncharoenwase < nullzero.f...@gmail.com> wrote: > I think that we should have a function which tries to login and return the > status whether that logging in is successful. What we currently do (for > example in APISite.deletepage()

[Pywikipedia-l] Propose to create another function to login

2014-01-23 Thread Sorawee Porncharoenwase
I think that we should have a function which tries to login and return the status whether that logging in is successful. What we currently do (for example in APISite.deletepage()) is that we "try: site.login(sysop=True) except pywikibot.NoUsername: blah blah" Isn't it better to have something like