Created
May 14, 2015 00:04
-
-
Save richo/edb87ba5edea389f3795 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/usr/bin/python | |
| import os | |
| import tempfile | |
| fd, name = tempfile.mkstemp() | |
| ret = os.system("$EDITOR '%s'" % (name)) | |
| if ret != 0: | |
| raise "Your editor exited non-zero" | |
| with open(name) as fh: | |
| print "You entered:" | |
| print fh.read() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment