Message252070
>> You also can check ``'d' in sys.abiflags`` if it looks cleaner to you.
> For me, it doesn't look correct to have various ways to check if python was compiled in debug mode. It doesn't look portable neither. (...)
Oops, I didn't notice that sys.abiflags is not available on Windows!
It's the same issue with 2 solutions to this question:
http://stackoverflow.com/questions/646518/python-how-to-detect-debug-interpreter
* Checking for '_d.pyd' in imp.get_suffixes() => specific to Windows
* sys.executable.endswith("_d.exe") => again, specific to Windows :-(
That's part of my rationale in my first message, we need a portable and reliable flag to check if Python was compiled in debug mode.
By the way, the StackOverflow question comes from an user who is probably not writing a test, but an application. It means that the flag is also helpful to final users. |
|
Date |
User |
Action |
Args |
2015-10-01 22:33:26 | vstinner | set | recipients:
+ vstinner, brett.cannon, ezio.melotti, alex, berker.peksag, serhiy.storchaka, matrixise |
2015-10-01 22:33:26 | vstinner | set | messageid: <1443738806.36.0.807225334682.issue25256@psf.upfronthosting.co.za> |
2015-10-01 22:33:26 | vstinner | link | issue25256 messages |
2015-10-01 22:33:26 | vstinner | create | |
|