[pypy-dev] PYPYLOG and colon as a special character

Matti Picus matti.picus at gmail.com
Fri Jun 13 16:34:13 CEST 2014


We discussed this on IRC and decided to add a workaround, '+filename' 
will be handled like 'filename'
Matti

On 13/06/2014 5:21 PM, Christian Hudon wrote:
> The colon character is valid in paths in Windows (because of the drive 
> letter), but not in filenames (it's used for supporting different 
> streams, which hardly anyone uses). So doing that check on 
> os.path.basename(os.getenv("PYPYLOG")) should work under Windows also.
>
> Of course, I didn't check the code, so it's possible I'm missing 
> something too.
>
> On 2014-06-13 9:10, Matti Picus wrote:
>> if PYPYLOG is a filename, we log to it (except debug_print)
>> if PYPYLOG is :filename, we log debug_print as well
>> if PYPYLOG is section:filename, we log only that section
>>
>> But : is a valid char for filename on windows, so something like
>> PYPYLOG=C:\TEMP\log.log
>> does the wrong thing, and even worse, does so silently.
>>
>> Matti
>> _______________________________________________
>> pypy-dev mailing list
>> pypy-dev at python.org
>> https://mail.python.org/mailman/listinfo/pypy-dev
>
> _______________________________________________
> pypy-dev mailing list
> pypy-dev at python.org
> https://mail.python.org/mailman/listinfo/pypy-dev



More information about the pypy-dev mailing list