Index: pkpgcounter/trunk/pkpgpdls/pjl.py
===================================================================
--- pkpgcounter/trunk/pkpgpdls/pjl.py (revision 3410)
+++ pkpgcounter/trunk/pkpgpdls/pjl.py (revision 3436)
@@ -8,10 +8,10 @@
 # the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
@@ -35,8 +35,8 @@
         return self.message
     __str__ = __repr__
-        
+
 class PJLParser :
     """A parser for PJL documents.
-    
+
        Information extracted for bpl11897.pdf which was
        downloaded from Hewlett-Packard's website.
@@ -52,6 +52,6 @@
         self.parsed = 0
         self.parse()
-        
-    def __str__(self) :    
+
+    def __str__(self) :
         """Outputs our variables as a string of text."""
         if not self.parsed :
@@ -62,16 +62,16 @@
             for (k, v) in self.default_variables.items() :
                 mybuffer.append("  %s : %s" % (k, v))
-        if self.environment_variables :        
+        if self.environment_variables :
             mybuffer.append("Environment variables :")
             for (k, v) in self.environment_variables.items() :
                 mybuffer.append("  %s : %s" % (k, v))
-        return "\n".join(mybuffer)        
-            
-    def logdebug(self, message) :    
+        return "\n".join(mybuffer)
+
+    def logdebug(self, message) :
         """Logs a debug message if needed."""
         if self.debug :
             sys.stderr.write("%s\n" % message)
-            
-    def cleanvars(self) :        
+
+    def cleanvars(self) :
         """Cleans the variables dictionnaries."""
         for dicname in ("default", "environment") :
@@ -80,5 +80,5 @@
                 if len(v) == 1 :
                     varsdic[k] = v[0]
-        
+
     def parse(self) :
         """Parses a JL job."""
@@ -95,14 +95,14 @@
                                   or ((self.jlmarker == "@EJL") and (parts[1].upper() == "JI"))) :
                         # this is what we are interested in !
-                        try :    
+                        try :
                             (varname, value) = "".join(parts[2:]).split("=", 1) # TODO : parse multiple assignments on the same SET/JI statement
-                        except :    
+                        except :
                             self.logdebug("Invalid JL SET statement [%s]" % repr(statement))
-                        else :    
+                        else :
                             # all still looks fine...
                             if parts[1].upper() == "DEFAULT" :
                                 varsdic = self.default_variables
-                            else :    
-                                varsdic = self.environment_variables 
+                            else :
+                                varsdic = self.environment_variables
                             variable = varsdic.setdefault(varname.upper(), [])
                             variable.append(value)
@@ -121,10 +121,10 @@
         self.parsed = 1
         # self.logdebug("%s\n" % str(self))
-        
+
 class EJLParser(PJLParser) :
     """A parser for EJL (Epson Job Language) documents."""
     JL = "EJL"
-        
-def test() :        
+
+def test() :
     """Test function."""
     if (len(sys.argv) < 2) or ((not sys.stdin.isatty()) and ("-" not in sys.argv[1:])) :
@@ -135,5 +135,5 @@
             infile = sys.stdin
             mustclose = 0
-        else :    
+        else :
             if arg.endswith(".ejl") :
                 klass = EJLParser
@@ -142,11 +142,11 @@
         try :
             parser = klass(infile.read(), debug=1)
-        except PJLParserError, msg :    
+        except PJLParserError, msg :
             sys.stderr.write("ERROR: %s\n" % msg)
             sys.stderr.flush()
-        if mustclose :    
+        if mustclose :
             infile.close()
-        print str(parser)            
-    
-if __name__ == "__main__" :    
+        print str(parser)
+
+if __name__ == "__main__" :
     test()
