[wingide-users] Custom Execute Script

Michael Foord fuzzyman at voidspace.org.uk
Sat Dec 30 15:25:12 MST 2006

Hello all,

Well, it turned out that writing a custom script to execute a file 
'externally' was *ridiculously* easy.

	import wingapi
	import os

	def custom_execute(app=wingapi.kArgApplication):
	  editor = app.GetActiveEditor()
	  filename = editor.GetDocument().GetFilename()
	  cmd = 'run_python "%s"' % filename

'run_python' is a batch file on the system path. It contains :

	python %1

I then bound 'custom-execute' to F5 in the keyboard preferences. Even I 
can handle that. ;-)


Michael Foord

More information about the wingide-users mailing list