[Subversion] / PyDicia / pydicia.py  

Diff of /PyDicia/pydicia.py

Parent Directory | Revision Log

version 2328, Thu Jul 5 15:45:29 2007 UTC version 2329, Thu Jul 5 16:15:23 2007 UTC
Line 1 
Line 1 
 import os, _winreg, datetime  import os, datetime
 from decimal import Decimal  from decimal import Decimal
 from simplegeneric import generic  from simplegeneric import generic
 from peak.util.decorators import struct  from peak.util.decorators import struct
Line 147 
Line 147 
   
 def _get_registry_string(root, path, subkey=None):  def _get_registry_string(root, path, subkey=None):
     """Return the registry value or ``None`` if not found"""      """Return the registry value or ``None`` if not found"""
       import _winreg
     try:      try:
         key = _winreg.OpenKey(root, path)          key = _winreg.OpenKey(root, path)
         try:          try:
Line 161 
Line 162 
 l1_enc = "<?xml version='1.0' encoding='iso-8859-1'?>\n"  l1_enc = "<?xml version='1.0' encoding='iso-8859-1'?>\n"
   
   
   
 class Batch:  class Batch:
     """An XML document and its corresponding package objects"""      """An XML document and its corresponding package objects"""
   
Line 442 
Line 442 
 FlatRateEnvelope     = PackageType('FLATRATEENVELOPE')  FlatRateEnvelope     = PackageType('FLATRATEENVELOPE')
 FlatRateBox          = PackageType('FLATRATEBOX')  FlatRateBox          = PackageType('FLATRATEBOX')
   
   try:
       from _winreg import HKEY_CURRENT_USER, HKEY_CLASSES_ROOT
   except ImportError:
       _get_registry_string = lambda *args: None
       HKEY_CURRENT_USER = HKEY_CLASSES_ROOT = None
   
   
 class DAZzle:  class DAZzle:
Line 472 
Line 472 
     Verify = Start('DAZ')      Verify = Start('DAZ')
   
     exe_path = _get_registry_string(      exe_path = _get_registry_string(
         _winreg.HKEY_CLASSES_ROOT, 'lytfile\\shell\\open\\command'          HKEY_CLASSES_ROOT, 'lytfile\\shell\\open\\command'
     )      )
   
     #@staticmethod      #@staticmethod
     def get_preference(prefname):      def get_preference(prefname):
         import _winreg  
         return _get_registry_string(          return _get_registry_string(
             _winreg.HKEY_CURRENT_USER,              HKEY_CURRENT_USER,
             'Software\\Envelope Manager\\dazzle\\Preferences', prefname              'Software\\Envelope Manager\\dazzle\\Preferences', prefname
         )          )
   
Line 490 
Line 489 
   
   
   
   
     @staticmethod      @staticmethod
     def run(args=(), sync=True):      def run(args=(), sync=True):
         """Start DAZzle with arguments, returning a process or return code"""          """Start DAZzle with arguments, returning a process or return code"""


Generate output suitable for use with a patch program
Legend:
Removed from v.2328  
changed lines
  Added in v.2329

cvs-admin@eby-sarna.com

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help