This ensures that the application will respond to open AppleEvents, which makes is feasible to use IDLE as the default application for python files.
(root, flist)
| 118 | ## Fix the menu and related functions. |
| 119 | |
| 120 | def addOpenEventSupport(root, flist): |
| 121 | """ |
| 122 | This ensures that the application will respond to open AppleEvents, which |
| 123 | makes is feasible to use IDLE as the default application for python files. |
| 124 | """ |
| 125 | def doOpenFile(*args): |
| 126 | for fn in args: |
| 127 | flist.open(fn) |
| 128 | |
| 129 | # The command below is a hook in aquatk that is called whenever the app |
| 130 | # receives a file open event. The callback can have multiple arguments, |
| 131 | # one for every file that should be opened. |
| 132 | root.createcommand("::tk::mac::OpenDocument", doOpenFile) |
| 133 | |
| 134 | def hideTkConsole(root): |
| 135 | try: |
no outgoing calls
no test coverage detected
searching dependent graphs…