Skip to content

Fangyh09/SavePythonCodes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Five lines save python codes

1. Add all .py to git

git init
git add *.py

2. Save it

if not os.path.exists(save_dir):
    os.mkdir(save_dir)
# back up code
os.makedirs(os.path.join(save_dir, 'code'), exist_ok=True)
os.system(' git ls-tree -r HEAD --name-only | xargs -I {} cp -a --parents {} ' + save_dir+"/code/")

About

Five lines to save all .py codes, very simple and elegant

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages