Created
November 16, 2017 09:25
-
-
Save suriyadeepan/4c09537c8373cd3b9ea3ee7e77fac7c9 to your computer and use it in GitHub Desktop.
sauce
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/python3 | |
import os | |
import pyperclip | |
def find(name, path): | |
for root, dirs, files in os.walk(path): | |
if name in files: | |
return os.path.join(root, name) | |
if __name__ == '__main__': | |
file_ = None | |
path = './' | |
while not file_: | |
file_ = find('activate', path) | |
path = path + '../' | |
pyperclip.copy('source ' + file_ + '\n') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment