# For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-Python-via-.NET.git. lic = aw.License() # Try to set license from the stream. try: with io.FileIO(LICENSE_PATH) as stream: lic.set_license(stream) print("License set successfully.") except RuntimeError as err: # We do not ship any license with this example, visit the Aspose site to obtain either a temporary or permanent license. print("\nThere was an error setting the license:", err)