This is a weird one.
I have this file :
OpMejoraBizobj.py
-------------------------------------------------------------------------------------
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import dabo
class OpMejoraBizobj(dabo.biz.dBizobj):
def metodoAComentar(self):
"""
Devuelve una tupla de dos listas con los sectores
y sus claves primarias. Esta es una "áéíóú"
"""
pass
------------------------------------------------------------------------------------
Without the accented letters "áéíóú" in the docstring everything works
fine, but as soon as those letters are there I get :
-------------------------------------------------------------------------------------
Microsoft Windows XP [Versión 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
D:\aaa-RA\Desarrollo\Python Testing>python
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
(Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import OpMejoraBizobj
>>> help('OpMejoraBizobj')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python25\lib\site.py", line 346, in __call__
return pydoc.help(*args, **kwds)
File "C:\Python25\lib\pydoc.py", line 1645, in __call__
self.help(request)
File "C:\Python25\lib\pydoc.py", line 1687, in help
elif request: doc(request, 'Help on %s:')
File "C:\Python25\lib\pydoc.py", line 1481, in doc
pager(title % desc + '\n\n' + text.document(object, name))
File "C:\Python25\lib\pydoc.py", line 324, in document
if inspect.ismodule(object): return self.docmodule(*args)
File "C:\Python25\lib\pydoc.py", line 1072, in docmodule
contents.append(self.document(value, key, name))
File "C:\Python25\lib\pydoc.py", line 325, in document
if inspect.isclass(object): return self.docclass(*args)
File "C:\Python25\lib\pydoc.py", line 1208, in docclass
contents = '\n'.join(contents)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
147: ordina
l not in range(128)
>>>
-------------------------------------------------------------------------------------
But if I inherit class OpMejoraBizobj from "object" or from nothing (old
style classes) the error goes away, with or without the accented letters.
My system :
Platform: Win
Python Version: 2.5.2 on win32
Dabo Version: Version 0.9.2; Revision ~5437
UI Version: 2.8.8.1 on wxMSW
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]