def shell(resourcesdir, command, *args):
    'Syntax: [storm shell resourcesdir command args]\n\n    Archives resources to jar and uploads jar to Nimbus, and executes following arguments on "local". Useful for non JVM languages.\n    eg: `storm shell resources/ python topology.py arg1 arg2`\n    '
    tmpjarpath = (('stormshell' + str(random.randint(0, 10000000))) + '.jar')
    os.system(('jar cf %s %s' % (tmpjarpath, resourcesdir)))
    runnerargs = [tmpjarpath, command]
    runnerargs.extend(args)
    exec_storm_class('org.apache.storm.command.shell_submission', args=runnerargs, jvmtype='-client', extrajars=[USER_CONF_DIR], fork=True)
    os.system(('rm ' + tmpjarpath))
Syntax: [storm shell resourcesdir command args]

Archives resources to jar and uploads jar to Nimbus, and executes following arguments on "local". Useful for non JVM languages.
eg: `storm shell resources/ python topology.py arg1 arg2`
def shell(resourcesdir, command, *args):
    'Syntax: [storm shell resourcesdir command args]\n\n    Archives resources to jar and uploads jar to Nimbus, and executes following arguments on "local". Useful for non JVM languages.\n    eg: `storm shell resources/ python topology.py arg1 arg2`\n    '
    tmpjarpath = (('stormshell' + str(random.randint(0, 10000000))) + '.jar')
    os.system(('jar cf %s %s' % (tmpjarpath, resourcesdir)))
    runnerargs = [tmpjarpath, command]
    runnerargs.extend(args)
    exec_storm_class('org.apache.storm.command.shell_submission', args=runnerargs, jvmtype='-client', extrajars=[USER_CONF_DIR], fork=True)
    os.system(('rm ' + tmpjarpath))