[wingide-users] Scripting command 'execute-os-commands'

Wing IDE Support support at wingware.com
Mon Nov 19 10:42:36 EST 2012

On 11/19/12 9:14 AM, Porlo wrote:
> I'm want to write a script that makes use of Wing's built in command
> '/execute-os-commad/'. 
> My os command is called '/_create_new_file/' and looks like this '/touch
> {ENV}/'. In other words use the Unix command /touch/ to create a new file,
> where {ENV} is the complete file path. The script looks like this:
> ...
> # this is the bit I need help with...	
> app.ExecuteCommand("execute-os-command", title='_create_new_file',
> *??args??*)

I think you probably want to use app.ExecuteCommandLine to run touch in
a sub-process.  To run it via OS Commands, you'd either need to define a
new command to do it or set a value in the project's environment that
then gets referenced in the OS Command.

You also could create the file directly in your script without executing
a sub-process.



More information about the wingide-users mailing list