[orca-list] Problems to recompile orca-customization



Hello,

I'm trying to recompile my orca-customization.py file to add new scripts
but I edit my orca-customization.py file and I restart orca but there is
not orca-customization.pyc file and there is no changes in orca....

What can I do?

here is my orca-customization.py file: 

# import orca.Gecko
import orca.braille as braille
import orca.speech as speech
import orca.keybindings as keybindings
import orca.input_event as input_event
import orca.settings as settings
import os
import time
from orca.orca_i18n import _

# orca.Gecko.controlCaretNavigation = True

# change orca-key for UMPC device
# settings.orcaModifierKeys = ["Insert","KP_Insert"]

def sayBattery(script, inputEvent=None):
        acpiBatteryPath = "/proc/acpi/battery" # path for batteries
        batteries = os.listdir(acpiBatteryPath) # gets all batteries in the PC
        if len(batteries) > 0 : # there is battery support
                for b in batteries:
                        # gets info about the battery
                        pathFile = acpiBatteryPath + "/" + b + "/"
                        infoBatteryFile = file(pathFile + "info", "r") # opens info battery
                        if infoBatteryFile.readline().split()[1] == "yes": 
                                infoBatteryFile.readline() # jumps a line
                                batteryMaxCap = float (infoBatteryFile.readline().split()[3]) # gets
max capacity
                                # gets status battery
                                statusBatteryFile = file(pathFile + "state", "r") # jumps to battery
charge
                                statusBatteryFile.readline()
                                statusBatteryFile.readline()
                                chargingStatus = statusBatteryFile.readline().split()[2]
                                statusBatteryFile.readline()
                                batteryCharge = int
(float(statusBatteryFile.readline().split()[2])/batteryMaxCap*100)
                                statusBatteryFile.close()
                                # make the string result
                                strResult = str(batteryCharge) + "% "
                                # add charging status (charging - charged )
                                if chargingStatus == "charged": strResult += " charged "
                                if chargingStatus == "charging": strResult += " charging "
                        else: strResult = "Battery not found" # battery not present
                        infoBatteryFile.close()
                        # for two or more batteries
                        if len(batteries) > 1: strResult = b + ":" + strResult
        else: strResult = "No battery support" 
        speech.speak(strResult)
        return true

def sayTime(script, inputEvent=None):
timeMessage = time.strftime("%H:%M", time.localtime())
        speech.speak(timeMessage)
        return true


sayTimeHandler = input_event.InputEventHandler(sayTime, _("Speak and
braille time information"))
sayBatteryHandler = input_event.InputEventHandler(sayBattery, _("Speak
and braille battery information"))

keys = keybindings.KeyBindings()

keys.add(keybindings.KeyBinding("t", 1<< settings.MODIFIER_ORCA, 1 <<
settings.MODIFIER_ORCA, sayTimeHandler))
keys.add(keybindings.KeyBinding("z", 1<< settings.MODIFIER_ORCA, 1 <<
settings.MODIFIER_ORCA, sayBatteryHandler))
settings.keyBindingsMap = {}
settings.keyBindingsMap["default"] = keys



thanks and regards
        Jonathan ChacÃn




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]