Bugs item #2009004, was opened at 2008-07-02 13:27 Message generated for change (Comment added) made by russblau You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2009004...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: None
Status: Closed Resolution: Fixed
Priority: 5 Private: No Submitted By: Mikko Silvonen (silvonen) Assigned to: Nobody/Anonymous (nobody) Summary: Log file location not set consistently on Windows
Initial Comment: I noticed that if I start interwiki.py with the command "interwiki.py -log ..." on Windows XP, its log file interwiki.log is created in the pywikipedia root directory, e.g. C:\svn\pywikipedia\interwiki.log.
However, if I use the command "python interwiki.py -log ...", the log file is properly created in the logs subdirectory, e.g. C:\svn\pywikipedia\logs\interwiki.log.
This is caused by the fact that sys.argv[0] is different depending on how you start interwiki.py: "interwiki.py" sets sys.argv[0] to "C:\svn\pywikipedia\interwiki.py", while "python interwiki.py" sets it to "interwiki.py" without the path. The function calledModuleName() in wikipedia.py uses sys.argv[0] to determine the module name, and setLogfileStatus() uses the module name to construct the log file name.
Can we use os.path.basename() in calledModuleName() to normalize the module name, or would this break something else?
----------------------------------------------------------------------
Comment By: Russell Blau (russblau)
Date: 2008-07-14 09:49
Message: Logged In: YES user_id=855050 Originator: NO
fixed in r5717
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2009004...