i'm trying use atom electron write desktop app both mac , windows.
what need here :
a button.
and when user click button runs following shell (or python script):
ping x.x.x.x
and result displayed in textarea.
i tried use [shelljs] , [yargs] seems not workable atom electron.
all want use javascript write desktop app (with gui of course) calls script (shell && python) automation work.
any suggestion appreciated, :)
it can done directly node, can use child_process
module. please notice asynchronous.
var exec = require('child_process').exec; function execute(command, callback){ exec(command, function(error, stdout, stderr){ callback(stdout); }); }; // call function execute('ping -c 4 0.0.0.0', function(output) { console.log(output); });
i encourage have @ npm, there tons of modules want, without calling python script.
Comments
Post a Comment