Windows: zim.log should be created not only for "zim.exe" but also for "pythonw.exe zim.py"

Bug #1091606 reported by K. Bauer on 2012-12-18
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

On Windows, stdout/stderr are redirected to %TEMP%\zim.log, if ZIM is run from a standalone-executable. Line 17 in "zim.py" reads:

    if os.name == "nt" and sys.argv[0].endswith('.exe'):

This condition should be rewritten to include running from source without a visible terminal, i.e. with pythonw.exe. Rewriting the line to

    if os.name == "nt" and ( sys.argv[0].endswith('.exe') or sys.executable.endswith('pythonw.exe') ):

should do the trick (i.e. it works, but I'm not sure if it is sufficiently general).

--- Platform Details ---
Windows 7 64bit
ZIM 0.58 source package
Enthought Python Distribution

K. Bauer (k.bauer) on 2012-12-18
description: updated
Changed in zim:
status: New → Confirmed
importance: Undecided → Low
Changed in zim:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers