Created
January 22, 2013 18:04
-
-
Save knmkr/4596727 to your computer and use it in GitHub Desktop.
for Mac, do `eject`
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import argparse | |
import subprocess | |
def _main(): | |
parser = argparse.ArgumentParser() | |
args = parser.parse_args() | |
eject_status = subprocess.check_call(["drutil", "eject"]) | |
print eject_status | |
if __name__ == '__main__': | |
_main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment