[wingide-users] Re: Problem with raw_input()

Wingware Support support at wingware.com
Wed Jul 20 07:50:48 MDT 2011

On 7/19/11 7:25 PM, Chiaki wrote:
> Thanks! I'm experiment with the arginfo() and I have a new problem.
> I put the script in top menu and works, but I want bind the function test()
> in a hotkey too but I can't because the function need one argument.
> def test(target):
>      wingapi.gApplication.ShowMessageDialog("", target)
> test.arginfo = {}
> test.arginfo['target'] = wingapi.CArgInfo("",
>                                  datatype.CType(''),
>                                  formbuilder.CFileSelectorGui(),
>                                  label = ("Input:"))
> test.contexts = [wingapi.kContextNewMenu(("Scripts"), group=1)]
> test.label = "Test"
> Thank you very much:)

If I'm understanding what you want correctly you can bind the hot key to 
test(target='myvalue').  This avoids prompting for the argument.  Or 
define another function that doesn't take an argument.


Stephan Deibel
Wingware | Python IDE
Advancing Software Development


More information about the wingide-users mailing list