Message190012
The point of File / Open Module is to look at the source for a module that has been, could be, or will be imported. The problem is that open_module is executed in the idle process while imports are executed in the user process, with the current directory prepended to sys.module.
The problem was already noted in the source, line 675.
# XXX Ought to insert current file's directory in front of path
The augmentation of sys.path and subsequent restoration of the original could be done in a context manager that might be useful elsewhere. For 3.3,3.4, I think the change should be done after the patch in #18055, to not invalidate that patch. It would need to located in a slightly different place in 2.7, which will not be changed by that issue. |
|
Date |
User |
Action |
Args |
2013-05-25 21:36:20 | terry.reedy | set | recipients:
+ terry.reedy, roger.serwy |
2013-05-25 21:36:20 | terry.reedy | set | messageid: <1369517780.56.0.941397989466.issue18064@psf.upfronthosting.co.za> |
2013-05-25 21:36:20 | terry.reedy | link | issue18064 messages |
2013-05-25 21:36:20 | terry.reedy | create | |
|