Changeset 1981 for pykota

Show
Ignore:
Timestamp:
12/13/04 21:48:33 (20 years ago)
Author:
jalet
Message:

Outputs debug info to stderr

Files:
1 modified

Legend:

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

    r1980 r1981  
    2222# 
    2323# $Log$ 
     24# Revision 1.46  2004/12/13 20:48:33  jalet 
     25# Outputs debug info to stderr 
     26# 
    2427# Revision 1.45  2004/12/13 20:39:46  jalet 
    2528# Added a --debug command line option to pkpgcounter, for people interested 
     
    580583                # if no number of copies defined, take the preceding one else the one set before any page else 1. 
    581584                page = pages.get(pnum, pages.get(pnum - 1, pages.get(0, { "copies" : 1, "mediasource" : "Main", "mediasize" : "Default", "mediatype" : "Plain", "orientation" : "Portrait"}))) 
    582                 print "%s*%s*%s*%s*%s" % (page["copies"], page["mediatype"], page["mediasize"], page["orientation"], page["mediasource"]) 
     585                sys.stderr.write("%s*%s*%s*%s*%s\n" % (page["copies"], page["mediatype"], page["mediasize"], page["orientation"], page["mediasource"])) 
    583586             
    584587        return pagecount 
     
    886889            self.pagecount += (copies - 1) 
    887890            if self.debug : 
    888                 print "%s*%s*%s*%s*%s" % (copies, page["mediatype"], page["mediasize"], page["orientation"], page["mediasource"]) 
     891                sys.stdrr.write("%s*%s*%s*%s*%s\n" % (copies, page["mediatype"], page["mediasize"], page["orientation"], page["mediasource"])) 
    889892             
    890893        return self.pagecount