Quoting "Phillip J. Eby" <pje at telecommunity.com>: > Using the C equivalent of 'imp.find_module()' should cover all these cases, > and any new forms of PY_SOURCE or PY_COMPILED that come up in future. That's essentially what the patch does. PyRun_SimpleModuleFlags uses _PyImport_FindModule to obtain the absolute file location, then uses PyRun_SimpleFileExFlags to actually run the script. _PyImport_FindModule is a trivial wrapper around import.c's find_module() (which, I believe, is what imp.find_module() invokes) When multiple versions exist, the patch operates on what find_module() returns (which ends up using the preference order '.py', '.pyw', '.py[co]') Cheers, Nick. -- Nick Coghlan Brisbane, Australia
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4