| 78 | filelist = [file] |
| 79 | return filelist |
| 80 | def convert(): |
| 81 | newext = frmt.get() |
| 82 | filelist= selector() |
| 83 | should_delete= varDel.get() |
| 84 | done= "Done. Deleted" if should_delete else "Done. Created" |
| 85 | for f in filelist: |
| 86 | infile = os.path.join(indir, f) |
| 87 | ofile = os.path.join(outdir, f) |
| 88 | outfile = os.path.splitext(ofile)[0] + newext |
| 89 | succeed= save(infile, outfile) |
| 90 | if should_delete and succeed: |
| 91 | os.remove(infile) |
| 92 | done= "%s=%s" % (done,len(filelist)) |
| 93 | win = Toplevel(root) |
| 94 | Button(win, text=done, command=win.destroy).pack() |
| 95 | |
| 96 | def ________________gui_________________():pass |
| 97 | # Divide GUI into 3 frames: top, mid, bot |