Jppy: 0.0.33 is ready

Norbert Preining preining at logic.at
Mon Oct 23 17:40:40 BST 2006


Hi Nick!

On Son, 22 Okt 2006, Nicholas Piper wrote:
> 0.0.33 fixes the trouble that Norbert had properly with regards to
> finding resources in /usr/share (both with the standalone and jpilot
> embedded GUI.)

What is the current code to be put into
	~/.jpilot/python/jpilot_user.py
The code I had before did stop working which 0.33. Currently I have:
----------------------------------------------------
import pygtk
pygtk.require("2.0")

import jppy
import pisock
import gtk
import gtk.glade

    
def plugin_gui(vbox,hbox):
    hbox.add(gtk.Label("Embedded jppy GUI is functional, but not useful yet."))
    hbox.show_all()
    
def plugin_startup():
    global conduit_list
    jppy.log("Python is working correctly.")
    conduit_list = []

def plugin_pre_sync_pre_connect():
    for conduit in conduit_list:
        conduit.pre_sync_pre_connect()
    return 0

def plugin_pre_sync():
    for conduit in conduit_list:
        conduit.pre_sync()
    return 0


def plugin_sync(sd):
    for conduit in conduit_list:
        conduit.sync(sd)
    return 0
   
def plugin_post_sync():
    for conduit in conduit_list:
        conduit.post_sync()
    return 0

def plugin_gui(vbox,hbox):
    guipath = "/usr/share/jppy/gui/"
    import sys
    sys.path.insert(0,guipath)
    import jppygui
    jppygui.jppy(hbox,control_mainloop=0,glade_path=guipath)
-------------------------------------

Maybe this should be documented somewhere, what is necessary to be
added.

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <preining at logic.at>                    Università di Siena
Debian Developer <preining at debian.org>                         Debian TeX Group
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
In those days spirits were brave, the stakes were high,
men were real men, women were real women, and small furry
creatures from Alpha Centauri were real small furry
creatures from Alpha Centauri.
                 --- Douglas Adams, The Hitchhikers Guide to the Galaxy




More information about the Jppy mailing list