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

Porlo pazerp at hotmail.com
Mon Nov 19 09:14:13 EST 2012

I'm want to write a script that makes use of Wing's built in command
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:

# --- start script --- #

app = wingapi.gApplication

# filename is date
dt = datetime.datetime.now().strftime("%a-%d-%b_%H-%M-%S")

# files placed in this folder
folder = "Users/paulpatterson/Desktop/PyTest/.pytemp/"

# create complete file-path
new_temp_file = os.path.join(folder, dt)

# this is the bit I need help with...	
app.ExecuteCommand("execute-os-command", title='_create_new_file',

# --- end script --- #

What I can't suss out is how to pass my /dt /argument to my command using
the 'ExecuteCommand' method of app, so that the {ENV} placeholder is
replaced by my argument


View this message in context: http://wingide.992054.n4.nabble.com/Scripting-command-execute-os-commands-tp4655307.html
Sent from the WingIDE - User mailing list archive at Nabble.com.

More information about the wingide-users mailing list