Changeset 3430

Show
Ignore:
Timestamp:
10/05/08 11:31:35 (14 years ago)
Author:
jerome
Message:

Another round of removing print statements.

Location:
pykota/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/pksetup

    r3413 r3430  
    269269        olddirectory = os.getcwd() 
    270270        directory = tempfile.mkdtemp() 
    271         print "\nDownloading additional software not available as packages in %(directory)s" % locals() 
     271        sys.stdout.write("\nDownloading additional software not available as packages in %(directory)s\n" % locals()) 
    272272        os.chdir(directory) 
    273273        for package in self.otherpackages : 
     
    420420            self.setupBackend() 
    421421            self.managePrinters(self.listPrinters()) 
    422             print nowready 
    423             print "The script %s can be used to reinstall in unattended mode.\n" % self.genInstaller() 
     422            sys.stdout.write("%s\n" % nowready) 
     423            sys.stdout.write("The script %s can be used to reinstall in unattended mode.\n\n" % self.genInstaller()) 
    424424 
    425425    def genInstaller(self) : 
     
    459459    retcode = 0 
    460460    if (len(sys.argv) != 2) or (sys.argv[1] == "-h") or (sys.argv[1] == "--help") : 
    461         print "pksetup v0.1 (c) 2003-2008 Jerome Alet - alet@librelogiciel.com\n\nusage : pksetup distribution\n\ne.g. : pksetup debian\n\nIMPORTANT : only Debian and Ubuntu are currently supported." 
     461        sys.stdout.write("pksetup v0.1 (c) 2003-2008 Jerome Alet - alet@librelogiciel.com\n\nusage : pksetup distribution\n\ne.g. : pksetup debian\n\nIMPORTANT : only Debian and Ubuntu are currently supported.\n") 
    462462    elif (sys.argv[1] == "-v") or (sys.argv[1] == "--version") : 
    463         print "0.1" # pksetup's own version number 
     463        sys.stdout.write("0.1\n") # pksetup's own version number 
    464464    else : 
    465465        classname = sys.argv[1].strip().title() 
  • pykota/trunk/checkdeps.py

    r3413 r3430  
    5959 
    6060if __name__ == "__main__" : 
    61     print "Checking PyKota dependencies..." 
     61    sys.stdout.write("Checking PyKota dependencies...\n") 
    6262 
    6363    # checks if Python version is correct, we need >= 2.2 
  • pykota/trunk/pykota/tool.py

    r3429 r3430  
    210210        except AttributeError : 
    211211            pass 
    212         print __version__ 
     212        self.display("%s\n" % __version__) 
    213213        sys.exit(0) 
    214214 
     
    219219        except AttributeError : 
    220220            pass 
    221         print _(self.documentation) % globals() 
    222         print __gplblurb__ 
    223         print 
    224         print _("Please report bugs to :"), __author__ 
     221        self.display("%s\n" % (_(self.documentation) % globals())) 
     222        self.display("%s\n\n" % __gplblurb__) 
     223        self.display("%s %s\n" % (_("Please report bugs to :"), __author__)) 
    225224        sys.exit(0) 
    226225