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/lidil.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/>. 
     
    2222"""This modules implements a page counter for HP LIDIL format. 
    2323 
    24    Documentation used :  
    25     
     24   Documentation used : 
     25 
    2626        hplip-2.7.10/prnt/ldl.py 
    2727        hplip-2.7.10/prnt/hpijs/ldlencap.h 
     
    5252    """A parser for HP LIDIL documents.""" 
    5353    format = "Hewlett-Packard LIDIL" 
    54     def isValid(self) :     
     54    def isValid(self) : 
    5555        """Returns True if data is LIDIL, else False.""" 
    5656        # Beginning Of File marker is a Sync packet, followed with 
     
    6161        # with a Reset packet. We ignore the preceding Sync packet 
    6262        # for simplicity's sake. 
    63         EOFMarker = "$\x00\x10\x00\x08\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff$$\x00\x10\x00\x06\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff$"  
     63        EOFMarker = "$\x00\x10\x00\x08\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff$$\x00\x10\x00\x06\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff$" 
    6464        if self.firstblock.startswith(BOFMarker) \ 
    6565           and self.lastblock.endswith(EOFMarker) : 
    6666            return True 
    67         else :     
     67        else : 
    6868            return False 
    69          
     69 
    7070    def getJobSize(self) : 
    7171        """Computes the number of pages in a HP LIDIL document.""" 
     
    8080                    # Invalid header or no Frame Sync byte. 
    8181                    raise pdlparser.PDLParserError, "This file doesn't seem to be valid Hewlett-Packard LIDIL datas." 
    82                 (framesync,      
     82                (framesync, 
    8383                 cmdlength, 
    8484                 dummy, 
     
    9393                        ejectpage += 1 
    9494                self.infile.seek(cmdlength + datalength - len(header), 1) # relative seek 
    95         except struct.error :     
     95        except struct.error : 
    9696            raise pdlparser.PDLParserError, "This file doesn't seem to be valid Hewlett-Packard LIDIL datas." 
    97              
     97 
    9898        # Number of page eject commands should be sufficient, 
    9999        # but we never know : someone could try to cheat the printer