Show
Ignore:
Timestamp:
06/26/04 16:14:31 (20 years ago)
Author:
jalet
Message:

Now uses Psyco if it is available

Files:
1 modified

Legend:

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

    r1568 r1570  
    2222# 
    2323# $Log$ 
     24# Revision 1.15  2004/06/26 14:14:31  jalet 
     25# Now uses Psyco if it is available 
     26# 
    2427# Revision 1.14  2004/06/25 09:50:28  jalet 
    2528# More debug info in PCLXL parser 
     
    438441        """ 
    439442        self.filename = filename 
     443        try : 
     444            import psyco  
     445        except ImportError :     
     446            pass # Psyco is not installed 
     447        else :     
     448            # Psyco is installed, tell it to compile 
     449            # the CPU intensive methods : PCL and PCLXL 
     450            # parsing will greatly benefit from this,  
     451            # for PostScript and PDF the difference is 
     452            # barely noticeable since they are already 
     453            # almost optimal, and much more speedy anyway. 
     454            psyco.bind(PostScriptAnalyzer.getJobSize) 
     455            psyco.bind(PDFAnalyzer.getJobSize) 
     456            psyco.bind(PCLAnalyzer.getJobSize) 
     457            psyco.bind(PCLXLAnalyzer.getJobSize) 
    440458         
    441459    def getJobSize(self) :