All Samples(1579) | Call(1474) | Derive(0) | Import(105)
asctime([tuple]) -> string Convert a time tuple to a string, e.g. 'Sat Jun 06 16:26:11 1998'. When the time tuple is not present, current time as returned by localtime() is used.
src/p/y/Python.Create.Modify.Reuse-HEAD/Ch09/time-example2.py Python.Create.Modify.Reuse(Download)
import time print "GMT Time as tuple: ", time.gmtime() print "GMT Time as string: ", time.asctime(time.gmtime()) print "Local Time as tuple: ", time.localtime() print "Local time as string: ", time.asctime(time.localtime()) print "Formatted local time in <month day, year> format: ", \
src/c/d/cdf-HEAD/examples/pythonic/new-cdf.py cdf(Download)
def new(filename):
now = time.time()
archive = cdf.pythonic.archive(filename)
archive.attr['timezone'] = time.tzname[0]
archive['unixtime'] = [now]
archive['unixtime'].attr['units'] = 's'
archive['localtime'] = [time.asctime(time.localtime(now))]
archive['utctime'] = [time.asctime(time.gmtime(now))]
src/e/d/Edwin-HEAD/scripts/msg/examples/pygtkjab.py Edwin(Download)
def log(self, data, inout=''):
## we overide xmlstreams log method with our own
if self.gui:
dbg_tab = self.gui.findTab( 'DEBUG' )
if dbg_tab:
dbg_tab._txt.insert(None, None, None, "%s - %s - %s\n" % \
(time.asctime(time.localtime(time.time())), inout, data ) )
src/w/e/Webware-for-Python-1.0.2/CGIWrapper/Examples/Time.py Webware for Python(Download)
<h3>Current Time</h3> <p>%s</p> </body> </html>''' % (wrapper.docType(), time.asctime(time.localtime(time.time())))
src/c/o/Code-HEAD/DiveIntoPython3/examples/customserializer.py Code(Download)
def to_json(python_object):
if isinstance(python_object, time.struct_time):
return {'__class__': 'time.asctime',
'__value__': time.asctime(python_object)}
if isinstance(python_object, bytes):
return {'__class__': 'bytes',
'__value__': list(python_object)}
src/p/e/pexpect-HEAD/pexpect/examples/bd_serv.py pexpect(Download)
try:
start_time = time.time()
print time.asctime()
main()
print time.asctime()
print "TOTAL TIME IN MINUTES:",
src/p/e/pexpect-HEAD/pexpect/examples/rippy.py pexpect(Download)
if __name__ == "__main__":
try:
start_time = time.time()
print time.asctime()
main()
print time.asctime()
print "TOTAL TIME IN MINUTES:",
src/p/e/pexpect-HEAD/pexpect/examples/hive.py pexpect(Download)
(options, args) = parser.parse_args()
if len(args) < 1:
parser.error ('missing argument')
if options.verbose: print time.asctime()
main()
if options.verbose: print time.asctime()
if options.verbose: print 'TOTAL TIME IN MINUTES:',
src/p/e/pexpect-2.4/examples/bd_serv.py pexpect(Download)
try:
start_time = time.time()
print time.asctime()
main()
print time.asctime()
print "TOTAL TIME IN MINUTES:",
src/b/o/boost_music-HEAD/examples/eventreceiver.py boost_music(Download)
import numpy from math import floor,ceil from time import time,sleep,asctime setup = music.Setup(sys.argv)
runtime = music.Runtime(setup, dt) print asctime() t = runtime.time() base_time = Wtime()
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next