License constructor
License()
Initializes a new instance of this class.
def __init__(self):
...
Examples
Shows how to initialize a license for Aspose.Words using a license file in the local file system.
import os
import shutil
test_license_file_name = 'Aspose.Total.NET.lic'
# Set the license for our Aspose.Words product by passing the local file system filename of a valid license file.
license_file_name = os.path.join(LICENSE_PATH, test_license_file_name)
license = aw.License()
license.set_license(license_name=license_file_name)
# Create a copy of our license file in the binaries folder of our application.
license_copy_file_name = os.path.join(AssemblyDir, test_license_file_name)
shutil.copy2(license_file_name, license_copy_file_name)
# If we pass a file's name without a path,
# the SetLicense will search several local file system locations for this file.
# One of those locations will be the "bin" folder, which contains a copy of our license file.
license.set_license(license_name=test_license_file_name)
See Also
- module aspose.words
- class License