Last active
September 30, 2017 19:26
-
-
Save socketwiz/6388903 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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