-
-
Save godwhoa/3125bf840b640445e181 to your computer and use it in GitHub Desktop.
copy and paste files when using separate shells
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 sys,os | |
clip = os.environ['HOME']+'/.fileclip' | |
path = sys.argv[1] | |
f=open(clip,'w') | |
f.write(os.getcwd()+'/'+path) | |
f.close() |
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 | |
from subprocess import call | |
import os | |
f=open(os.environ['HOME']+'/.fileclip','r') | |
path = f.read() | |
f.close() | |
call(["cp", "-a",path,"."]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment