Discussion:
[BitPim-devel] BitPim Help
d***@netzero.com
2005-02-11 22:14:17 UTC
Permalink
Thanks Roger. Still planning for a Monday Night Build?

-Joe Pham



______________________________________________________________________
Speed up your surfing with NetZero HiSpeed.
Now includes pop-up blocker!
Only $14.95/month -visit http://www.netzero.com/surf to sign up today!
Roger Binns
2005-02-12 07:41:28 UTC
Permalink
Post by d***@netzero.com
Thanks Roger. Still planning for a Monday Night Build?
The versionhistory and cvslog is pretty empty.

None of my updates warrant a build, and the image cropping etc
won't be ready by then.

If you or Stephen want one then I'll do it, else wait for another
week.

Roger
Stephen Wood
2005-02-12 13:53:46 UTC
Permalink
I am working some important fixes for the MM7400 and VGA1000. Unless
I can get those absolutely solid by Sunday night, I would want to
delay it because Monday and Tuesday are pretty hectic.

Stephen
Post by Roger Binns
Post by d***@netzero.com
Thanks Roger. Still planning for a Monday Night Build?
The versionhistory and cvslog is pretty empty.
None of my updates warrant a build, and the image cropping etc
won't be ready by then.
If you or Stephen want one then I'll do it, else wait for another
week.
Roger
Yosef Meller
2005-02-12 18:47:17 UTC
Permalink
Hi,

I've started adding support for my phone, and managed to get something
preliminary working. I'm extracting data from the phonebook, but when it
gets to display the actual records (after running Phone.getphonebook) I
get an exception when displaying Hebrew (cp-1255 or iso-8859-8)
charachters.

The data in colums that have only 0-127 charachter codes (such as my
dummy group names) gets displayed properly.

So, I guess I need to tell it what encoding I'm using, but I could not
find where to do so. Can anyone direct me?

My exception:

Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/wx/_core.py", line 10604, in
<lambda>
lambda event: event.callable(*event.args, **event.kw) )
File "/home/yosef/bitpim/guihelper.py", line 115, in _busywrapper
return method(*args, **kwargs)
File "/home/yosef/src/bitpim/phonebook.py", line 1641, in DoMerge
self._DoMerge(progdlg)
File "/home/yosef/src/bitpim/phonebook.py", line 1737, in _DoMerge
self.table.OnDataUpdated()
File "/home/yosef/bitpim/guihelper.py", line 115, in _busywrapper
return method(*args, **kwargs)
File "/home/yosef/src/bitpim/phonebook.py", line 1397, in OnDataUpdated
self.main.OnCellSelect()
File "/home/yosef/src/bitpim/phonebook.py", line 1782, in OnCellSelect
self.resultpreview.ShowEntry(self.resultdata[resultid])
File "/home/yosef/src/bitpim/phonebook.py", line 163, in ShowEntry
self.SetPage(text)
File "/home/yosef/bitpim/bphtml.py", line 77, in SetPage
wx.html.HtmlWindow.SetPage(self,text)
File "/usr/lib/python2.3/site-packages/wx/html.py", line 973, in SetPage
return _html.HtmlWindow_SetPage(*args, **kwargs)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position
462: ordinal not in range(128)

And not to be only on the asking side, I'm attaching a Makefile I wrote
to replace makepackets.sh. The advantage of it is that if you're only
updating your own protocol, there's no need to remake all other
protocols (not really an issue now, but I'm a forward thinker).

Thanks,
Yosef.
--
Keep on rocking in a free world!
Roger Binns
2005-02-14 06:37:47 UTC
Permalink
Post by Yosef Meller
to replace makepackets.sh. The advantage of it is that if you're only
updating your own protocol, there's no need to remake all other
protocols (not really an issue now, but I'm a forward thinker).
The shell file has the advantage of automatically picking up all
the files. The previous scheme often had people forgetting to
add new .p files to the main list. We were also adding new phones
at a considerably higher rate.
Post by Yosef Meller
So, I guess I need to tell it what encoding I'm using, but I could not
find where to do so. Can anyone direct me?
BitPim originally used host encoding which was whatever flavour of
8 bit codepage the user had.

During the migration to wxPython 2.5, we switched over to using Unicode
everywhere. (BTW Mac doesn't have a Unicode 2.5.2 so things are worse
there).

There is currently zero code that deals with characters going to or from
phones. This is in the todo list to fix: http://bitpim.org/todo.html

Data that comes from external sources such as Outlook, vCards etc should
work fine.

Roger
Stephen Wood
2005-02-14 14:25:04 UTC
Permalink
Post by Roger Binns
Post by Yosef Meller
to replace makepackets.sh. The advantage of it is that if you're only
updating your own protocol, there's no need to remake all other
protocols (not really an issue now, but I'm a forward thinker).
The shell file has the advantage of automatically picking up all
the files. The previous scheme often had people forgetting to
add new .p files to the main list. We were also adding new phones
at a considerably higher rate.
How about this?

PYTHON=python
PACKET_SOURCES:= $(wildcard p_*.p)

packets: $(patsubst %.p, %.py, $(PACKET_SOURCES))

%.py: %.p
@echo $<; $(PYTHON) protogen.py $< $@

It's gnumake only. Can we assume that gnumake exists on any platform
that /bin/sh scripts run on?

Better yet, could we compile the .p files in bp.py with something like this:

if __debug__:
compile_out_of_date_dotp_files()

Stephen
Roger Binns
2005-02-15 07:33:27 UTC
Permalink
Post by Stephen Wood
It's gnumake only. Can we assume that gnumake exists on any platform
that /bin/sh scripts run on?
Makefiles are painful on Windows, and there are various other issues
as well such as filesystem timestamp granularity.
Post by Stephen Wood
compile_out_of_date_dotp_files()
An individual developer has the need to use up to date code for whatever
module they are working on. Everyone else has the need to be running
the correct code no matter what combinations of edits and cvs updates
they have done. The testing and builds need to always be against the
same code for everyone and be repeatable.

The current solution is the most simple, most correct and least
efficient. It only takes a second or so to run for me.

I have updated protogen.py so it can do all the work. If you invoke
it with no arguments, it rebuilds all the files. With one argument
it rebuilts that file. With two, the second specifies the output
filename.

If you are doing development work, I would suggest using this
as your command:

python protogen.py mymodule.p && python bp.py

On Windows, just use one ampersand.

Roger

Yosef Meller
2005-02-14 21:20:51 UTC
Permalink
Post by Roger Binns
Post by Yosef Meller
So, I guess I need to tell it what encoding I'm using, but I could not
find where to do so. Can anyone direct me?
BitPim originally used host encoding which was whatever flavour of
8 bit codepage the user had.
During the migration to wxPython 2.5, we switched over to using Unicode
everywhere. (BTW Mac doesn't have a Unicode 2.5.2 so things are worse
there).
There is currently zero code that deals with characters going to or from
phones. This is in the todo list to fix: http://bitpim.org/todo.html
Data that comes from external sources such as Outlook, vCards etc should
work fine.
Ok, I have a workaround that will alow me to work for now:
some_string.decode('cp1255') right where I get the string. I think after
I get something working I can work on adding an encoding listbox to the
settings dialog and enforce its value in (I think) common.py:
forceascii->force_user_enc or something. Haven't really dug in yet.

BTW - Ely, didn't you have to deal with the same issue? I see you are
with Pelephone too.
Post by Roger Binns
Post by Yosef Meller
And not to be only on the asking side, I'm attaching a Makefile I
wrote to replace makepackets.sh. The advantage of it is that if you're
only updating your own protocol, there's no need to remake all other
protocols (not really an issue now, but I'm a forward thinker).
The shell file has the advantage of automatically picking up all
the files. The previous scheme often had people forgetting to
add new .p files to the main list. We were also adding new phones
at a considerably higher rate.
I like Stephen's idea.
--
Keep on rocking in a free world!
Roger Binns
2005-02-15 07:14:41 UTC
Permalink
Post by Yosef Meller
some_string.decode('cp1255') right where I get the string. I think after
I get something working I can work on adding an encoding listbox to the
forceascii->force_user_enc or something. Haven't really dug in yet.
That is definitely the wrong place to go about this. The conversion
and configuration needs to be done at the place the string arrives.
You didn't say where it was but I assume it is the phone module.
The phone module should be converting to Unicode as it reads the
value in, and convert from unicode when writing back out.

Is that particular model used anywhere else in the world?

Roger
Loading...