Guido van Rossum | c636014 | 1990-10-13 19:23:40 +0000 | [diff] [blame] | 1 | # Module 'anywin' |
| 2 | # Open a file or directory in a window |
| 3 | |
| 4 | import dirwin |
| 5 | import filewin |
Guido van Rossum | 25d7caf | 1992-03-31 19:04:48 +0000 | [diff] [blame] | 6 | import os |
Guido van Rossum | c636014 | 1990-10-13 19:23:40 +0000 | [diff] [blame] | 7 | |
| 8 | def open(name): |
| 9 | print 'opening', name, '...' |
Guido van Rossum | 25d7caf | 1992-03-31 19:04:48 +0000 | [diff] [blame] | 10 | if os.path.isdir(name): |
Guido van Rossum | c636014 | 1990-10-13 19:23:40 +0000 | [diff] [blame] | 11 | w = dirwin.open(name) |
| 12 | else: |
| 13 | w = filewin.open(name) |
| 14 | return w |