Show
Ignore:
Timestamp:
05/25/04 11:15:15 (20 years ago)
Author:
jalet
Message:

accounter.py : old code deleted
the rest : now exports PYKOTAPRECOMPUTEDJOBSIZE and PYKOTAPRECOMPUTEDJOBPRICE

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/accounter.py

    r1495 r1499  
    2222# 
    2323# $Log$ 
     24# Revision 1.16  2004/05/25 09:15:15  jalet 
     25# accounter.py : old code deleted 
     26# the rest : now exports PYKOTAPRECOMPUTEDJOBSIZE and PYKOTAPRECOMPUTEDJOBPRICE 
     27# 
    2428# Revision 1.15  2004/05/24 22:45:49  jalet 
    2529# New 'enforcement' directive added 
     
    7175 
    7276import sys 
    73 from pykota import pdlanalyzer 
    7477 
    7578class PyKotaAccounterError(Exception): 
     
    8891        self.filter = kotafilter 
    8992        self.arguments = arguments 
    90         self.firstPassSize = None 
    91          
    92     def getSoftwareJobSize(self) :     
    93         """Pre-computes the job's size with a software method.""" 
    94         if self.filter.preserveinputfile is None : 
    95             raise PyKotaAccounterError, "Only supports raw jobs for now.""" 
    96         else :     
    97             fname = self.filter.preserveinputfile 
    98         parser = pdfanalyzer.PDLAnalyzer(fname)     
    99         try :  
    100             jobsize = parser.getJobSize() 
    101         except TypeError, msg :     
    102             raise PyKotaAccounterError, msg 
    103         else :     
    104             self.firstPassSize = jobsize 
    10593         
    10694    def getLastPageCounter(self) :