Peter Landgren added the comment:
I could add what I have found using bsddb in Python 2.5 and 2.6 under Windows
XP SP3. In my installation:
Python 2.5.4 bsddb 4.4.5.3
Python 2.6.4 bsddb 4.7.3
What I did: In Gramps imported an XML backup file to a empty bsddb database. It
took about 1 hour
Peter Landgren added the comment:
Requested data on my Windows box:
Python 2.5 bsddb 4.4.5.3 4.4.20
Python 2.6 bsddb 4.7.3 4.7.25
Python 2.6 bsddb 4.8.4 4.8.26
OK?
--
___
Python tracker
<http://bugs.python.org/issue8
Peter Landgren added the comment:
Maybe I should add that there is no speed degradation between 2.5 and 2.5 when
doing the same thing in Linux.
--
___
Python tracker
<http://bugs.python.org/issue8
Peter Landgren added the comment:
In Linux it is:
4.4.5.3 (4, 6, 21)
You asked for a test case. I'm not sure how I can provide one without you
having Gramps installed to test it.
Do you mean the whole database environment?
--
___
Python tr
Peter Landgren added the comment:
To make it 100% clear:
The versions are almost the same for Linux and Windows.
Python 2.5Python 2.6
Windows 4.4.5.3 (4, 6, 20)4.7.3 (4.7.25)
Linux4.4.5.3 (4, 6, 21)4.7.3 (4.7.25
New submission from Peter Landgren :
The time it takes, in the application Gramps, to fill an empty bsddb database
by importing an XML backup or a GECDOM file, incrises from about 2 minutes to
about an hour in Windows XP ana Windows 7. No such degradation has been sen in
Linux.
The Gramps
Peter Landgren added the comment:
1. Sorry, I made a mistake this morning. (Had to run to a funeral.)
These are the correct version:
Python 2.5 Python 2.6
Windows 4.4.5.3 (4, 4, 20)4.7.3 (4.7.25)
Linux4.4.5.3 (4, 6, 21)4.7.3 (4.7.25)
So, the same versions of
New submission from Peter Landgren :
If any of the Swedish characters "åäöÅÄÖ" are input to
unicode.normalize(form, ustr) with form = "NFD" or "NFKD" the result
will be "aaoAAO". "åäöÅÄÖ" are normal character and should be the same
after normaliz
Peter Landgren added the comment:
Thanks for the fast response.
I understand that python follows the unicode specification. I think the unicode
standard
is not correct in this case for the Swedish letters. I have asked unicode.org
for an
explanation.
Should not the Danish letter "
Peter Landgren added the comment:
The same applies "Å" and "A", "Ä" and "A" and "Ö" and "O"
which also are also different letters as "Ø" and "O" are. ("Ø" is the Danish
version of
"Ö" )
Ma
Peter Landgren added the comment:
> Martin v. Löwis added the comment:
> > The same applies "Å" and "A", "Ä" and "A" and "Ö" and "O"
> > which also are also different letters as "Ø" and "O" are.
>
Peter Landgren added the comment:
The È... comes from French surnames and our French developer wants to group all
versions
of E together. The É... can be found in French surnames in Sweden as well as in
Germany.
The program, GRAMPS is a genealogy program used in about 20 languages, so there
New submission from Peter Landgren :
string.lowercase is changed after locale.setlocale(locale.LC_ALL,'') in
Windows XP but not in Linux.
This little test script on Windows XP and Linux explains the problem:
import locale
import string
print string.lowercase
print locale.setlocale(loc
Peter Landgren added the comment:
Thru, but later in the application code like this
a = u"qaz" + string.lowercase[26]
causes
a = u"qaz" + string.lowercase[26]
UnicodeDecodeError: 'ascii' codec can't decode byte 0x83 in position 0:
ordinal not i
Peter Landgren added the comment:
True, but later in the application code like this
a = u"qaz" + string.lowercase[26]
causes
a = u"qaz" + string.lowercase[26]
UnicodeDecodeError: 'ascii' codec can't decode byte 0x83 in position 0:
ordinal not i
Peter Landgren added the comment:
OK about 2.5
Downloaded and installed Python 2.6.2 on my Win XP box and get the same
error as with Python 2.5.1.
Ok about Python 3, it will be nice when we have upgraded our
application, Gramps, to this version and get rid of all kind of coding
issues
Peter Landgren added the comment:
Just some more test. I compared the result of string.letters,
string.uppercase and string.lowercase in 2.5 and 2.6:
Python25:
Letters=
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzâèîÄܣ׃¬Á║└┴┬├─┼ãÃ
╚╔╩╦╠═╬¤ðÐÊËÈıÍÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýÝ
Peter Landgren added the comment:
OK,
Agreed for 2.6.
But for 2.5 many of the characters returned by string.lowercase:
âܣ׬Á║▀ÓßÔÒõÕµþÞÚÛÙýݯ´±‗¾¶§÷°¨·¹³²■
are not lowercase letters at all, but that is history now, as 2.5 is history.
We solved it by using ascii_lowercase.
Thanks,
Peter
Peter Landgren added the comment:
Obviously, 2.5 and 2.6 decode the "string.lowercase" when print is used and
2.6 seems to
be the correct.
Yes. I get exactly the same result in both
Python 2.5.2 (r252:60911, Jan 8 2009, 12:17:37)
and
Python 2.6.2 (r262:71600, Jul 23 2009, 09:01:0
New submission from Peter Landgren :
When the variable label is equal to '\xc5\xa0 Z\nX W'
this line sequence
label = " ".join(label.split())
label = unicode(label)
results in:
7347: ERROR: gramps.py: line 138: Unhandled exception
Traceback (most recent call last):
File &q
Peter Landgren added the comment:
I am not sure I can follow you. I will try to be more specific.
The test string consists originally of one character; the Czech Š.
1. On Linux with Python 2.6.4
1.1 If I keep the original code line order:
label = obj.get()
print type(label), repr(label)
label
Peter Landgren added the comment:
So as a summary to what Ezio Melotti said:
I should always specify encoding when calling split() to be sure nothing nasty
happens? (Belive Ezio Melotti meant "calling split()" not "calling unicode()"
in his last answer?)
Thanks f
New submission from Peter Landgren :
This is in Windows.
I got an error message in Logging in my application Gramps.
However, there is an error message generated by by this logging, so the
original message is never output.
The last line indicate a problem with bytes in certain positions. I was
Peter Landgren added the comment:
Answer to your first question:
- The variable s is of type 'unicode'
- The variable record.exc_text, which is what Formatter.formatException
returns, is of type 'str'
For your second question; I'm not a python expert, so I can
24 matches
Mail list logo