Did I find the right examples for you? yes no

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)

        def get_time(local = True):
    current_time = localtime() if local else gmtime()
    return strftime("%a, %d %b %I:%M:%S%p", current_time)
        


src/p/y/pyHarp-0.1/pyharp/queue_system.py   pyHarp(Download)
import threading
from time_helper import get_time
from traceback import print_exc
 
class Job(object):
    def execute(self):
        print "\t Job #%s STARTED @ %s -- Remaining: %s." % (self.id, get_time(), Job.UNFINISHED_COUNT)
#         print "\t action: %r (%r, %r)" % (self.action, self.args, self.kwargs)
        try:
            self.action(*self.args, **self.kwargs)
        except Exception, e:
            print_exc(e)
        Job.UNFINISHED_COUNT = Job.UNFINISHED_COUNT - 1
        print "\t Job #%s FINISHED @ %s -- Remaining: %s" % (self.id, get_time(), Job.UNFINISHED_COUNT)

src/p/y/pyHarp-0.1/pyharp/http_helper.py   pyHarp(Download)
from file_system import get_file_content, format_filesize
from file_naming import safe_filename
from time_helper import get_time
from queue_system import Job
from pub_sub import Target
            if new_percent > old_percent:
                emit(new_percent)
                print "\t\t\t\t%s :: %s%%  @ %s" % (localName, new_percent, get_time())
 
            # we want to detect if we are not getting any data.