10 sec poll - please reply!
davea at dejaviewphoto.com
Tue Nov 20 14:39:43 CET 2012
On 11/20/2012 07:18 AM, Michael Herrmann wrote:
> I'm developing a GUI Automation library (http://www.getautoma.com) and am having difficulty picking a name for the function that simulates key strokes. I currently have it as 'type' but that clashes with the built-in function. Example uses of 'type':
> type("Hello World!")
> type(CTRL + 'a')
> What, in your view, would be the most intuitive alternative name?
> Here are my thoughts so far: I could call it 'press' but then our GUI automation tool also allows you to click things and then "press" might be mistaken for "pressing a button". A less ambiguous alternative is "type_keys" but that is rather long and doesn't read as well, for instance in type_keys(ENTER).
> Thank you very much!
I also vote for send_keys(), even before I saw Chris' reply.
'type' is too overloaded a word. For example, in Windows, it's the
command to display the contents of a file - it types it to the screen.
More information about the Python-list