File selection dialog which checks that the file exists.
| 231 | |
| 232 | |
| 233 | class LoadFileDialog(FileDialog): |
| 234 | |
| 235 | """File selection dialog which checks that the file exists.""" |
| 236 | |
| 237 | title = "Load File Selection Dialog" |
| 238 | |
| 239 | def ok_command(self): |
| 240 | file = self.get_selection() |
| 241 | if not os.path.isfile(file): |
| 242 | self.master.bell() |
| 243 | else: |
| 244 | self.quit(file) |
| 245 | |
| 246 | |
| 247 | class SaveFileDialog(FileDialog): |
no outgoing calls
no test coverage detected
searching dependent graphs…