Last active
November 6, 2015 17:43
-
-
Save oscarmorrison/6a92ce348d9a91090219 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
import subprocess | |
raw_location = subprocess.check_output("whereami", shell=False) | |
raw_location = raw_location.split() | |
lat = raw_location[1] | |
lon = raw_location[3] | |
hashtag = "#latlon"+lat+"__"+lon | |
command = "echo "+ "\'" + hashtag + "\' | pbcopy" | |
p = subprocess.Popen(['pbcopy'], stdin=subprocess.PIPE) | |
p.stdin.write(hashtag) | |
p.stdin.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment