I'm really beginner in python and I have a project I want to collect and upload dotfiles to the user's GitHub account in Linux machines. So if any bad thing happens to your computer or if you want to take back your configurations you can easily reach your old dotfiles.
#!/usr/bin/python
import glob
variable = glob.glob('/home/'hostname'/.*')
In this code, I can find the dot files but I don't know how to generate a directory with these files and upload them on the user's GitHub. And if you want to commit this opensource project here is the GitHub link: https://github.com/lvntky/DotCollector