Skip to content

Instantly share code, notes, and snippets.

@socketwiz
Last active September 30, 2017 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save socketwiz/6388903 to your computer and use it in GitHub Desktop.
Save socketwiz/6388903 to your computer and use it in GitHub Desktop.
#
# RoverExecutor.py
# Rover
#
# Created by Ricky Nelson on 7/16/10.
#
from Foundation import *
from AppKit import *
import subprocess
class PythonExecutor(NSObject):
@classmethod
def main_(self, args):
textView = args[0];
path = args[1]
p = subprocess.Popen('ls /', shell=True, stdout=subprocess.PIPE).stdout
textView.textStorage().mutableString().setString_(p.read())
return YES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment