All Downloads are FREE. Search and download functionalities are using the official Maven repository.

thon.2.5.3-rc1.source-code.snippet.py Maven / Gradle / Ivy

Go to download

Jython is an implementation of the high-level, dynamic, object-oriented language Python written in 100% Pure Java, and seamlessly integrated with the Java platform. It thus allows you to run Python on any Java platform.

There is a newer version: 2.7.4
Show newest version
#Snippet
from java.sql import Date
from java.util import Calendar
from time import time
from datetime import date

def convert():
    date_list = []
    for _ in range(9775):
        d = date(2012, 1, 1)
        date_list.append(d)

    start = time()
    for item in date_list:
        item.__tojava__(Calendar)
    print("Time spent: %s" % (time() - start))# Snippet

if __name__ == '__main__':
    convert()    




© 2015 - 2024 Weber Informatics LLC | Privacy Policy