Show
Ignore:
Timestamp:
10/06/08 00:22:07 (16 years ago)
Author:
jerome
Message:

Removed spaces at EOL.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pkpgcounter/trunk/pkpgpdls/zjstream.py

    r3410 r3436  
    88# the Free Software Foundation, either version 3 of the License, or 
    99# (at your option) any later version. 
    10 #  
     10# 
    1111# This program is distributed in the hope that it will be useful, 
    1212# but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1313# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1414# GNU General Public License for more details. 
    15 #  
     15# 
    1616# You should have received a copy of the GNU General Public License 
    1717# along with this program.  If not, see <http://www.gnu.org/licenses/>. 
     
    2828class Parser(pdlparser.PDLParser) : 
    2929    """A parser for ZjStream documents.""" 
    30     def isValid(self) :     
     30    def isValid(self) : 
    3131        """Returns True if data is ZjStream, else False.""" 
    3232        if self.firstblock[:4] == "ZJZJ" : 
    3333            self.format = "Zenographics ZjStream (little endian)" 
    3434            return self.littleEndian() 
    35         elif self.firstblock[:4] == "JZJZ" :     
     35        elif self.firstblock[:4] == "JZJZ" : 
    3636            self.format = "Zenographics ZjStream (big endian)" 
    3737            return self.bigEndian() 
    38         else :     
     38        else : 
    3939            return False 
    40          
     40 
    4141    def littleEndian(self) : 
    4242        """Toggles to little endianness.""" 
    4343        self.unpackHeader = "<IIIHH" 
    4444        return True 
    45          
     45 
    4646    def bigEndian(self) : 
    4747        """Toggles to big endianness.""" 
    4848        self.unpackHeader = ">IIIHH" 
    4949        return True 
    50          
     50 
    5151    def getJobSize(self) : 
    5252        """Computes the number of pages in a ZjStream document.""" 
     
    6666                 signature) = unpack(unpackHeader, header) 
    6767                self.infile.seek(totalChunkSize - len(header), 1) 
    68                 if chunkType == 2 :     
     68                if chunkType == 2 : 
    6969                    #self.logdebug("startPage") 
    7070                    startpagecount += 1 
     
    7474                #elif chunkType == 0 : 
    7575                #    self.logdebug("startDoc") 
    76                 #elif chunkType == 1 :     
     76                #elif chunkType == 1 : 
    7777                #    self.logdebug("endDoc") 
    78                 #     
     78                # 
    7979                #self.logdebug("Chunk size : %s" % totalChunkSize) 
    8080                #self.logdebug("Chunk type : 0x%08x" % chunkType) 
     
    8585        except struct.error : 
    8686            raise pdlparser.PDLParserError, "This file doesn't seem to be valid ZjStream datas." 
    87              
     87 
    8888        # Number of endpage commands should be sufficient, 
    8989        # but we never know : someone could try to cheat the printer