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

Lib.test.print_sans_lib.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
# Used by test_codec_jy::CodecsTestCase.test_print_sans_lib.
# Run without importing site module so codec registry is not initialised yet.
import sys
from os.path import basename
# Hide standard library from import mechanism so the Python codec cannot be found.
sys.path = [p for p in sys.path if basename(p).lower() != 'lib']
# Can we still encode and decode utf-8?
encoded = u'hi'.encode("utf-8")
encoded.decode('utf-8')




© 2015 - 2024 Weber Informatics LLC | Privacy Policy