[BangPypers] Using dogtail to test/automate gtk apps
Hello, I am trying to use dogtail to make a demonstration about automating tests for certain gtk applications we develop. I managed to get a fair bit of it working but I am having a hard time getting dogtail to send events to certain types of widgets, primarily the EventBox widget. I've googled and not found anything significant. Has anyone worked on this? I am pasting some code. # This program draws a simple window with an event box in it. The # eventbox is attached to the on_evbox_clicked() function and prints # a simple message upon being clicked. import pygtk pygtk.require('2.0') import atk import gtk def on_evbox_clicked(evbox,event): print Simple click event evbox = gtk.EventBox() evbox.connect(button-release-event,on_evbox_clicked) evbox_acc = evbox.get_accessible() evbox_acc.set_name(test event box) window = gtk.Window() window.add(evbox) window.connect(delete-event,gtk.main_quit) window_acc = window.get_accessible() window_acc.set_name(test window) window_acc.set_role(atk.ROLE_WINDOW) window.show_all() gtk.main() # end of eventbox.py from dogtail.utils import run from dogtail import tree from os import environ,path,remove app=tree.root.application('eventbox.py') evbox=app.child(test event box) print evbox.actions # actions are showing up as an empty dict. :( -- So for some vague reason the eventbox has no actions associated with it. Does anyone have a clue why this is so? Thank you, Jayanth ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
[BangPypers] Any python metaclasses for UID
A small typo there super(UID,self).Wind(7) *is* super(ClassI,self).Wind(7) Well google's is doing definitely a strong attempt here. I guess it's metaprogramming than metaclassing. Class GoogleOS(OS): def __init__(self): self.official.languages = ['c++','java','python'] self.name = 'Chrome' def os(self,Browser(Webapps)): self.aim.compatibility = Gates().Wind(7).os.compatibility + Mac().os.compatibility self.patches = tobe decided where Gates is extended by Boost for seamless interoperability. I haven't got any more ideas on this. Well about the useful part of the search I think Data Snooping Bias should be avoidedl. -- Regards ___ Shivaraj ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Any python metaclasses for UID
On Wed, Jul 29, 2009 at 12:58 PM, Shivaraj M Sshivraj...@gmail.com wrote: A small typo there super(UID,self).Wind(7) is super(ClassI,self).Wind(7) Well google's is doing definitely a strong attempt here. I guess it's metaprogramming than metaclassing. Class GoogleOS(OS): def __init__(self): self.official.languages = ['c++','java','python'] self.name = 'Chrome' def os(self,Browser(Webapps)): self.aim.compatibility = Gates().Wind(7).os.compatibility + Mac().os.compatibility self.patches = tobe decided where Gates is extended by Boost for seamless interoperability. I haven't got any more ideas on this. Well about the useful part of the search I think Data Snooping Bias should be avoidedl. I have a good feeling that Shivaraj is a spambot :P Regards Rajeev j Sebastian ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Using dogtail to test/automate gtk apps
Hello Jayanth, Did you get a chance to try the same with LDTP [1] ? Its being used by GNOME automation project [2], Ubuntu, VMware, Palm Source. [1] - http://ldtp.freedesktop.org [2] - http://mago.ubuntu.com Thanks Nagappan On Wed, Jul 29, 2009 at 12:07 AM, Srijayanth Sridhar srijaya...@gmail.comwrote: Hello, I am trying to use dogtail to make a demonstration about automating tests for certain gtk applications we develop. I managed to get a fair bit of it working but I am having a hard time getting dogtail to send events to certain types of widgets, primarily the EventBox widget. I've googled and not found anything significant. Has anyone worked on this? I am pasting some code. # This program draws a simple window with an event box in it. The # eventbox is attached to the on_evbox_clicked() function and prints # a simple message upon being clicked. import pygtk pygtk.require('2.0') import atk import gtk def on_evbox_clicked(evbox,event): print Simple click event evbox = gtk.EventBox() evbox.connect(button-release-event,on_evbox_clicked) evbox_acc = evbox.get_accessible() evbox_acc.set_name(test event box) window = gtk.Window() window.add(evbox) window.connect(delete-event,gtk.main_quit) window_acc = window.get_accessible() window_acc.set_name(test window) window_acc.set_role(atk.ROLE_WINDOW) window.show_all() gtk.main() # end of eventbox.py from dogtail.utils import run from dogtail import tree from os import environ,path,remove app=tree.root.application('eventbox.py') evbox=app.child(test event box) print evbox.actions # actions are showing up as an empty dict. :( -- So for some vague reason the eventbox has no actions associated with it. Does anyone have a clue why this is so? Thank you, Jayanth ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- Linux Desktop (GUI Application) Testing Project - http://ldtp.freedesktop.org http://nagappanal.blogspot.com ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
[BangPypers] how to embed the python interpreter into web App
Hi All I am trying to embed the python interpreter in to a web page but could not get the way, any one can suggest me how to do this. Thanks, Sibtey Mehdi This e-mail (and any attachments), is confidential and may be privileged. It may be read, copied and used only by intended recipients. Unauthorized access to this e-mail (or attachments) and disclosure or copying of its contents or any action taken in reliance on it is unlawful. Unintended recipients must notify the sender immediately by e-mail/phone delete it from their system without making any copies or disclosing it to a third person. ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] how to embed the python interpreter into web App
You mean like this? http://shell.appspot.com/ Regards, Nandakishore On Wed, Jul 29, 2009 at 6:30 PM, Mehndi, Sibtey sibtey.meh...@genpact.comwrote: Hi All I am trying to embed the python interpreter in to a web page but could not get the way, any one can suggest me how to do this. Thanks, Sibtey Mehdi This e-mail (and any attachments), is confidential and may be privileged. It may be read, copied and used only by intended recipients. Unauthorized access to this e-mail (or attachments) and disclosure or copying of its contents or any action taken in reliance on it is unlawful. Unintended recipients must notify the sender immediately by e-mail/phone delete it from their system without making any copies or disclosing it to a third person. ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] how to embed the python interpreter into web App
Yes, I need exactly the same functionality From: bangpypers-bounces+sibtey.mehndi=genpact@python.org [mailto:bangpypers-bounces+sibtey.mehndi=genpact@python.org] On Behalf Of B.Nanda Kishore Sent: Wednesday, July 29, 2009 6:35 PM To: Bangalore Python Users Group - India Subject: Re: [BangPypers] how to embed the python interpreter into web App You mean like this? http://shell.appspot.com/ Regards, Nandakishore On Wed, Jul 29, 2009 at 6:30 PM, Mehndi, Sibtey sibtey.meh...@genpact.commailto:sibtey.meh...@genpact.com wrote: Hi All I am trying to embed the python interpreter in to a web page but could not get the way, any one can suggest me how to do this. Thanks, Sibtey Mehdi This e-mail (and any attachments), is confidential and may be privileged. It may be read, copied and used only by intended recipients. Unauthorized access to this e-mail (or attachments) and disclosure or copying of its contents or any action taken in reliance on it is unlawful. Unintended recipients must notify the sender immediately by e-mail/phone delete it from their system without making any copies or disclosing it to a third person. ___ BangPypers mailing list BangPypers@python.orgmailto:BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers This e-mail (and any attachments), is confidential and may be privileged. It may be read, copied and used only by intended recipients. Unauthorized access to this e-mail (or attachments) and disclosure or copying of its contents or any action taken in reliance on it is unlawful. Unintended recipients must notify the sender immediately by e-mail/phone delete it from their system without making any copies or disclosing it to a third person. ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] how to embed the python interpreter into web App
I am trying to embed the python interpreter in to a web page but could not get the way, any one can suggest me how to do this. http://werkzeug.pocoo.org/documentation/0.5.1/debug.html ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
[BangPypers] how to embed the python interpreter into web App
Hi All I am trying to embed the python interpreter in to a web page but could not get the way, any one can suggest me how to do this. Thanks, Sibtey Mehdi This e-mail (and any attachments), is confidential and may be privileged. It may be read, copied and used only by intended recipients. Unauthorized access to this e-mail (or attachments) and disclosure or copying of its contents or any action taken in reliance on it is unlawful. Unintended recipients must notify the sender immediately by e-mail/phone delete it from their system without making any copies or disclosing it to a third person. ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] how to embed the python interpreter into web App
You have got a source link there on that page. check it. shell.appspot.com Regards, Nandakishore On Wed, Jul 29, 2009 at 5:46 PM, Mehndi, Sibtey sibtey.meh...@genpact.comwrote: Hi All I am trying to embed the python interpreter in to a web page but could not get the way, any one can suggest me how to do this. Thanks, Sibtey Mehdi This e-mail (and any attachments), is confidential and may be privileged. It may be read, copied and used only by intended recipients. Unauthorized access to this e-mail (or attachments) and disclosure or copying of its contents or any action taken in reliance on it is unlawful. Unintended recipients must notify the sender immediately by e-mail/phone delete it from their system without making any copies or disclosing it to a third person. ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Any python metaclasses for UID
On Wed, Jul 29, 2009 at 12:58 PM, Shivaraj M Sshivraj...@gmail.com wrote: A small typo there But an important one. super(UID,self).Wind(7) is super(ClassI,self).Wind(7) Well google's is doing definitely a strong attempt here. I guess it's metaprogramming than metaclassing. Nonsense. It's simple method dispatching. Class GoogleOS(OS): def __init__(self): self.official.languages = ['c++','java','python'] self.name = 'Chrome' def os(self,Browser(Webapps)): self.aim.compatibility = Gates().Wind(7).os.compatibility + Mac().os.compatibility self.patches = tobe decided where Gates is extended by Boost for seamless interoperability. Not really. You're reinstantiating Boost using the Gates provider which won't work in this context. I haven't got any more ideas on this. Why don't you try to converting Gates to a factory? That might help you out rather than the one way UIDs. Well about the useful part of the search I think Data Snooping Bias should be avoidedl. Don't knock it till you've tried it. I'm sure you'll get far with that query. Also try frobnicating the bogosphere. -- ~noufal http://nibrahim.net.in ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Any python metaclasses for UID
I think I just fell down the rabbit hole. On Wed, Jul 29, 2009 at 10:17 PM, Noufal Ibrahimnou...@gmail.com wrote: On Wed, Jul 29, 2009 at 12:58 PM, Shivaraj M Sshivraj...@gmail.com wrote: A small typo there But an important one. super(UID,self).Wind(7) is super(ClassI,self).Wind(7) Well google's is doing definitely a strong attempt here. I guess it's metaprogramming than metaclassing. Nonsense. It's simple method dispatching. Class GoogleOS(OS): def __init__(self): self.official.languages = ['c++','java','python'] self.name = 'Chrome' def os(self,Browser(Webapps)): self.aim.compatibility = Gates().Wind(7).os.compatibility + Mac().os.compatibility self.patches = tobe decided where Gates is extended by Boost for seamless interoperability. Not really. You're reinstantiating Boost using the Gates provider which won't work in this context. I haven't got any more ideas on this. Why don't you try to converting Gates to a factory? That might help you out rather than the one way UIDs. Well about the useful part of the search I think Data Snooping Bias should be avoidedl. Don't knock it till you've tried it. I'm sure you'll get far with that query. Also try frobnicating the bogosphere. ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Any python metaclasses for UID
On Wed, 29 Jul 2009 23:26:17 +0530 Noufal Ibrahim nou...@gmail.com wrote: On Wed, Jul 29, 2009 at 10:20 PM, Roshan Mathewsrmath...@gmail.com wrote: I think I just fell down the rabbit hole. The time has come the Walrus said to speak of many things! Of atoms, and stars, and nebulae, Of entropy, and genes! Regards, Gora ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Any python metaclasses for UID
I think I just fell down the rabbit hole. I think BangPypers just got its own John Harrop. Regards, BG -- Baishampayan Ghose b.ghose at gmail.com ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Using dogtail to test/automate gtk apps
Hello Jayanth, If you are using latest distribution, you can see all the accessible information through Accerciser application. Thanks Nagappan On Wed, Jul 29, 2009 at 5:55 AM, Srijayanth Sridhar srijaya...@gmail.comwrote: Hello all, For some vague reason the click() function isn't defined on certain types of Node objects, I have no clue why, I haven't looked at the code in detail, but I took the Node.click() method, rewrote it as a standalone function and passed the eventbox into it and it works. So I think this might actually be a bug at some level, or a really strange feature. Nagappan, thanks for LDTP. I'll take a look at that one as well. Thank you, Jayanth On Wed, Jul 29, 2009 at 5:57 PM, Nagappan Alagappan nagap...@gmail.comwrote: Hello Jayanth, Did you get a chance to try the same with LDTP [1] ? Its being used by GNOME automation project [2], Ubuntu, VMware, Palm Source. [1] - http://ldtp.freedesktop.org [2] - http://mago.ubuntu.com Thanks Nagappan On Wed, Jul 29, 2009 at 12:07 AM, Srijayanth Sridhar srijaya...@gmail.com wrote: Hello, I am trying to use dogtail to make a demonstration about automating tests for certain gtk applications we develop. I managed to get a fair bit of it working but I am having a hard time getting dogtail to send events to certain types of widgets, primarily the EventBox widget. I've googled and not found anything significant. Has anyone worked on this? I am pasting some code. # This program draws a simple window with an event box in it. The # eventbox is attached to the on_evbox_clicked() function and prints # a simple message upon being clicked. import pygtk pygtk.require('2.0') import atk import gtk def on_evbox_clicked(evbox,event): print Simple click event evbox = gtk.EventBox() evbox.connect(button-release-event,on_evbox_clicked) evbox_acc = evbox.get_accessible() evbox_acc.set_name(test event box) window = gtk.Window() window.add(evbox) window.connect(delete-event,gtk.main_quit) window_acc = window.get_accessible() window_acc.set_name(test window) window_acc.set_role(atk.ROLE_WINDOW) window.show_all() gtk.main() # end of eventbox.py from dogtail.utils import run from dogtail import tree from os import environ,path,remove app=tree.root.application('eventbox.py') evbox=app.child(test event box) print evbox.actions # actions are showing up as an empty dict. :( -- So for some vague reason the eventbox has no actions associated with it. Does anyone have a clue why this is so? Thank you, Jayanth ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- Linux Desktop (GUI Application) Testing Project - http://ldtp.freedesktop.org http://nagappanal.blogspot.com ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- Linux Desktop (GUI Application) Testing Project - http://ldtp.freedesktop.org http://nagappanal.blogspot.com ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Any python metaclasses for UID
I didn't call _you_ Jo[h]n Harrop, man :) I called the OP a troll because his question is pretty much meaningless and is causing unnecessary irritation. May be it was because of the way I quoted the mail. Sorry for the confusion :-p Regards, BG On 7/30/09, Roshan Mathews rmath...@gmail.com wrote: On Thu, Jul 30, 2009 at 1:43 AM, Baishampayan Ghoseb.gh...@gmail.com wrote: I think I just fell down the rabbit hole. I think BangPypers just got its own John Harrop. Jon, I think you mean (although there is a John Harrop in the Clojure community), in which case I'm guessing you're trying hard to say I'm trolling (like the JH in comp.lang.lisp) ... except I wasn't, I just wanted context. Something which Noufal seemed to pull out of thin air. Roshan ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- Sent from my mobile device Baishampayan Ghose b.ghose at gmail.com ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Any python metaclasses for UID
On Thursday 30 Jul 2009 9:31:40 am Baishampayan Ghose wrote: May be it was because of the way I quoted the mail. Sorry for the confusion :-p top posting almost invariably causes confusion - an excellent way of making sure no one knows what you are talking about -- regards Kenneth Gonsalves Associate NRC-FOSS http://nrcfosshelpline.in/web/ ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Any python metaclasses for UID
On Thu, Jul 30, 2009 at 9:31 AM, Baishampayan Ghoseb.gh...@gmail.com wrote: I didn't call _you_ Jo[h]n Harrop, man :) I called the OP a troll because his question is pretty much meaningless and is causing unnecessary irritation. May be it was because of the way I quoted the mail. Sorry for the confusion :-p Ah, no biggie. Like KG says, I shouldn't have top posted. :) Roshan ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] Any python metaclasses for UID
May be it was because of the way I quoted the mail. Sorry for the confusion :-p top posting almost invariably causes confusion - an excellent way of making sure no one knows what you are talking about Hehe :) I for one merely wanted to add to Roshan's sentiment by drawing an analogy with the usual way in which Jon Harrop traumatises different mailing lists. Regards, BG -- Baishampayan Ghose b.ghose at gmail.com ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers