()
| 61 | return False |
| 62 | |
| 63 | def selector(): |
| 64 | path, file = os.path.split(openfile) |
| 65 | base, ext = os.path.splitext(file) |
| 66 | if varRec.get(): |
| 67 | G= filePattern._paths_from_path_patterns([indir], includes=["*%s"%ext]) |
| 68 | l=[g for g in G] |
| 69 | return l |
| 70 | else: |
| 71 | if var.get(): |
| 72 | ls = os.listdir(indir) |
| 73 | filelist = [] |
| 74 | for f in ls: |
| 75 | if os.path.splitext(f)[1] == ext: |
| 76 | filelist.append(f) |
| 77 | else: |
| 78 | filelist = [file] |
| 79 | return filelist |
| 80 | def convert(): |
| 81 | newext = frmt.get() |
| 82 | filelist= selector() |