Simple button that triggers an external python script


Hi all,

I want to utilize Meteor for a narrow use-case where the end user has the ability to click a button that will trigger an external Python script and do nothing else (the Python script does not send data back to Meteor). What’s the simplest JavaScript code that can do this? Thanks.


use something like this:

or a system call. Trigger this from a method (

    myPythonCall: function(value) {
        var exec = Npm.require('child_process').exec;
        var errorCallBack = function(e) { console.log("errorCallBack"); };
        var runCmd = Meteor.wrapAsync(exec,
            function(error, stdout, stderr) {
                if (error)
                    console.log('Error binding to environment');
        ) );

        var command = "python";
        var result = runCmd(command);

You then call that method through an event listener which is executed through a click on the button.