set_license method
Contents
[
Hide
]set_license(license_name)
Licenses the component.
def set_license(self, license_name: str):
...
Parameter | Type | Description |
---|---|---|
license_name | str | Can be a full or short file name or name of an embedded resource. Use an empty string to switch to evaluation mode. |
Remarks
Tries to find the license in the following locations:
Explicit path.
The folder that contains the Aspose component assembly.
The folder that contains the client’s calling assembly.
The folder that contains the entry (startup) assembly.
An embedded resource in the client’s calling assembly.
Note: On the .NET Compact Framework, tries to find the license only in these locations:
Explicit path.
An embedded resource in the client’s calling assembly.
set_license(stream)
Licenses the component.
def set_license(self, stream: io.BytesIO):
...
Parameter | Type | Description |
---|---|---|
stream | io.BytesIO | A stream that contains the license. |
Remarks
Use this method to load a license from a stream.
Examples
Shows how initialize a license for Aspose.Words using a license file in the local file system.
# Set the license for our Aspose.Words product by passing the local file system filename of a valid license file.
license = aw.License()
license.set_license(LICENSE_PATH)
See Also
- module aspose.words
- class License