The problem I ran into didn't happen during import-time (probably because the python 2.4 ctypes bug was already fixed by that time) but during run-tme. It happened because 'any()' was used in the report code, triggered by the line pr.add_proc_info(), which already is using the report module. This means the buggy report module was being used before the fileutils.likely_packaged check was even reached.
if you reshuffled the code to make the likely_packaged() check happen before any report code is called at all, that would be best. It's important an absolute minimum happens before the system decides not to do anything, because the more work it does, the more likely it is there is a bug. Glancing at the code such reshuffle looks possible, so I hope that is what you committed.
The problem I ran into didn't happen during import-time (probably because the python 2.4 ctypes bug was already fixed by that time) but during run-tme. It happened because 'any()' was used in the report code, triggered by the line pr.add_proc_info(), which already is using the report module. This means the buggy report module was being used before the fileutils. likely_ packaged check was even reached.
if you reshuffled the code to make the likely_packaged() check happen before any report code is called at all, that would be best. It's important an absolute minimum happens before the system decides not to do anything, because the more work it does, the more likely it is there is a bug. Glancing at the code such reshuffle looks possible, so I hope that is what you committed.