コード例 #1
0
ファイル: Processor.py プロジェクト: BackupTheBerlios/eikazo
  
  All processors must be "threading-aware". I.e. they must maintain 
  a state; all methods may be called from another thread.

  Trivial processors can simply do all processing in their append()
  method  
"""  

import sys, time, traceback, weakref
from SaneError import SaneError
import threading, SaneThread
import gobject
import I18n
DEBUG = 1

t = I18n.get_translation('eikazo')
if t:
    _ = t.gettext
else:
    _ = lambda x: x

# "serial number" for jobs.
_jobid = 0
# paranoia check: which attributes may be set for a SaneScanJob
# instance. This ensures that attributes are not lost in SaneScanJob.copy
#
# attributes we don't want:
# 'error'
# attributes that need a "deep copy"
_deepcopyattr = ('img', )
# attributes that may be copied using sequence oprators
コード例 #2
0
ファイル: Eikazo.py プロジェクト: BackupTheBerlios/eikazo
import gtk

import SaneThread, threading
import Widgets, Config
import Preview
import ScanJob
import I18n
import Processor
import Help
import Plugins
import output, postprocessing
from SaneError import SaneError

from devices.scannerinfo import scannerinfo

t = I18n.get_translation('eikazo')
if t:
    _ = t.gettext
else:
    _ = lambda x: x

t2 = I18n.get_translation('sane-backends')
if t2:
    SB_ = t2.gettext
else:
    SB_ = lambda x: x



class ScanStarter(Processor.SaneInputProducer):
    def __init__(self, device):