access to palm with pilot-link pisock library (python binding)
Asheesh Laroia
pan-news at asheeshenterprises.com
Fri Sep 20 17:53:38 EDT 2002
You could try the jpilot-Python tools that integrate Python and JPilot.
While it's not a perfect solution, it's the best I can find that works for
Python right now.
You can get it from http://www.nickpiper.co.uk/jpilot-python.php3. If
something doesn't work for you, *make sure to email the author*; he is
very responsive.
Best luck! Feel free to reply!
-- Asheesh.
On Fri, 20 Sep 2002 04:08:43 +0000, Solon Kazantzidis wrote:
> Hello,
>
> I want to achieve the following:
>
> - I want to use the python language to access my palm pilot Vx - I found
> the pilot-link package which provides a python binding of the pisock
> library written in c
> - Unfortunately the documentation I need as newbie to this is listed in
> the TODO list so I am searching a documentation - I want to be able to
> connect to the Palm (I have some example for a connection from the
> pyrite-publisher .py file) - I want to be able make what the pilot-xfer -l
> command does - I want to be able to create/delete/access databases stored
> on my Palm
> - I need to have access on data which I want to gather with the Palm
>
> What I achieved so far:
> 1. downloaded pilot-link package (version 0.11.3) 2. build it and created
> the python binding (python version 2.2.1) 3. from file
> plugin_instpisock.py (pyrite-publisher) I got some starting information to
> establish connection to the palm:
>
> -------------------------------------------------------------------------
>
> #!/usr/bin/python2.2
> import pisock
>
> port = "/dev/pilot"
>
> sd = pisock.pi_socket(pisock.PI_AF_SLP, pisock.PI_SOCK_STREAM,
> pisock.PI_PF_PADP)
> if not sd:
> print "failed to create socket"
> exit
> if (pisock.pi_bind(sd, (pisock.PI_AF_SLP, port))) == -1:
> print "failed to bind socket"
> exit
> if (pisock.pi_listen(sd, 1)) == -1:
> print "failed to listen on socket"
> exit
> ret = pisock.pi_accept(sd)
> if ret == -1:
> print "failed to accept connection"
> exit
> socket = ret[0]
> pisock.dlp_OpenConduit(socket)
> pisock.dlp_ReadDBList(sd,0,pisock.dlpDBListRAM,0)
>
> --------------------------------------------------------------------------
>
> As there is no documentation out there and I am not the best programmer I
> can only say that the whole procedure stops with a:
> "Speicherzugriffsfehler"-->(translated) "Memory access failure"
>
> All works fine until the "ret = pisock.pi_accept(sd)". At this point the
> python interpreter stops and waits for me to press the hotsync button.
> After I press it the above mentioned error arises.
>
>
> I need urgently help with this as I cannot with the start form my thesis
> until the mechanism for accessing works. (and then the real work of
> synchronising gathered data starts....)
>
>
> Thanks alot for your help/comments,
>
> Solon.
More information about the Python-list
mailing list