tar -c will not accept input from stdin, so your ... | tar <args> cannot succeed. Think about these options:
1: Do you really need tar format for a single file? Why?
2: Do this in two steps: First dump the data, then zip or tar zip the resulting file (see mysqldump --help, look for the -r flag ... unless you are on Windows, in which case redirecting onto a file is better)
2) I've looked for the command to do what I want to do, and I think that's it (minus the " | tar cvz" now, of course). I just want to make a backup of my databases and send them to myself. But when I implement the command without tar, it sends me an empty sql file?
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: