root / pkpgcounter / trunk / pdlanalyzer / pdlparser.py @ 203

Revision 200, 1.4 kB (checked in by jerome, 20 years ago)

More file splits

  • Property svn:eol-style set to native
  • Property svn:keywords set to Auth Date Id Rev
Line 
1#
2# pkpgcounter : a generic Page Description Language parser
3#
4# (c) 2003,2004,2005 Jerome Alet <alet@librelogiciel.com>
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
18#
19# $Id$
20#
21
22import sys
23
24class PDLParserError(Exception):
25    """An exception for PDLParser related stuff."""
26    def __init__(self, message = ""):
27        self.message = message
28        Exception.__init__(self, message)
29    def __repr__(self):
30        return self.message
31    __str__ = __repr__
32       
33class PDLParser :
34    """Generic PDL parser."""
35    def __init__(self, infile, debug=0) :
36        """Initialize the generic parser."""
37        self.debug = debug
38        self.infile = infile
39               
40    def getJobSize(self) :           
41        """Counts pages in the document."""
42        raise RuntimeError, "Not implemented !"
Note: See TracBrowser for help on using the browser.