Changeset 9c3d784 in sasview for src/sas/sascalc/data_util


Ignore:
Timestamp:
Apr 30, 2017 4:15:17 PM (8 years ago)
Author:
andyfaff
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
a1b8fee
Parents:
b636dfc5
Message:

MAINT: using print function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/data_util/calcthread.py

    r7432acb r9c3d784  
    295295    """ 
    296296    def __init__(self, n=20000): 
    297         print thread.get_ident() 
     297        print(thread.get_ident()) 
    298298        self.starttime = clock() 
    299299        self.done = False 
     
    307307        self.work2.queue(n) 
    308308        self.work3.queue(n) 
    309         print "Expect updates from Main every second and from thread every 2.5 seconds" 
    310         print "" 
     309        print("Expect updates from Main every second and from thread every 2.5 seconds") 
     310        print("") 
    311311        self.work.ready(.5) 
    312312        while not self.done: 
    313313            sleep(1) 
    314             print "Main thread %d at %.2f" % (thread.get_ident(), 
    315                                               clock() - self.starttime) 
     314            print("Main thread %d at %.2f" % (thread.get_ident(), 
     315                                              clock() - self.starttime)) 
    316316 
    317317    def update(self, i=0): 
    318         print "Update i=%d from thread %d at %.2f" % (i, thread.get_ident(), 
    319                                                       clock() - self.starttime) 
     318        print("Update i=%d from thread %d at %.2f" % (i, thread.get_ident(), 
     319                                                      clock() - self.starttime)) 
    320320        self.work.ready(2.5) 
    321321 
    322322    def complete(self, total=0.0): 
    323         print "Complete total=%g from thread %d at %.2f" % (total, 
     323        print("Complete total=%g from thread %d at %.2f" % (total, 
    324324                                                    thread.get_ident(), 
    325                                                     clock() - self.starttime) 
     325                                                    clock() - self.starttime)) 
    326326        self.done = True 
Note: See TracChangeset for help on using the changeset viewer.