On Sat, 11 Jun 2005, Jamie C wrote:
You need an "import os" (or "import os.path") in commandinterpreter.py
or running GPL() doesn't work on windows (because you use os.path to
open COPYING). Porting to other platforms really is good for finding
bugs...
Sounds good. I've put an import statement in. I've got no idea why this
works in unix.
Also, it comes out in a narrow column instead of wrapping nicely, and
it has a few error characters in it which are probably from unix EOLs.
I've expressed it all in a nice picture!
http://www-xray.ast.cam.ac.uk/~jc/veusz2.jpg
Hmmm... I think I should open the file with universal line endings support
(add "U" to the file mode). Can you try somthing like this patch...?
I don't think I should go messing with the GPL text formatting to make it
fit the width of the window better. I don't want to change the meaning or
anything. There's probably an argument that the command should pop-up a
window in windowing mode.
We may need to enable universal line endings for every file we read. Does
anyone know whether there a bad implications for this?
Jeremy
--
Jeremy Sanders <[EMAIL PROTECTED]>
http://www.jeremysanders.net/ Cambridge, UK
Public Key Server PGP Key ID: E1AAE053
--- document/commandinterpreter.py 2005-06-12 14:06:11.316086328 +0100
+++ document/commandinterpreter.py.~1.18.~ 2005-05-15 16:19:23.000000000
+0100
@@ -46,7 +46,6 @@
import sys
import traceback
import pickle
-import os.path
import commandinterface
import utils
@@ -246,7 +245,7 @@
"""Write the GPL to the console window."""
# FIXME: This should open up a separate window
dirname = os.path.dirname(__file__)
- file = open(os.path.join(dirname, '..', 'COPYING'), 'rU')
+ file = open('%s/../COPYING' % dirname, 'r')
for line in file:
sys.stdout.write(line)