Ask for a directory
| 357 | |
| 358 | # the directory dialog has its own _fix routines. |
| 359 | class Directory(commondialog.Dialog): |
| 360 | "Ask for a directory" |
| 361 | |
| 362 | command = "tk_chooseDirectory" |
| 363 | |
| 364 | def _fixresult(self, widget, result): |
| 365 | if result: |
| 366 | # convert Tcl path objects to strings |
| 367 | try: |
| 368 | result = result.string |
| 369 | except AttributeError: |
| 370 | # it already is a string |
| 371 | pass |
| 372 | # keep directory until next time |
| 373 | self.options["initialdir"] = result |
| 374 | self.directory = result # compatibility |
| 375 | return result |
| 376 | |
| 377 | # |
| 378 | # convenience stuff |
no outgoing calls
no test coverage detected
searching dependent graphs…