Home Download Buy Blog Forum Support

Python Run File, get output

Python Run File, get output

Postby jbrooksuk on Tue Feb 01, 2011 11:25 am

Hi all,

How could I run a command via Python (fixjsstyle) with the current file name and read the stdout from it or refresh the file view?

James
jbrooksuk
 
Posts: 775
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Re: Python Run File, get output

Postby jps on Tue Feb 01, 2011 11:39 am

You can use the subprocess module for that - have a look at Default/exec.py for an example
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Python Run File, get output

Postby jbrooksuk on Tue Feb 01, 2011 11:46 am

Brilliant! Cheers Jon!

James
jbrooksuk
 
Posts: 775
Joined: Sun Apr 11, 2010 10:37 am
Location: England


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 6 guests