Package schrodinger :: Package application :: Package bioluminate :: Module license :: Class License
[hide private]
[frames] | no frames]

Class License

object --+
         |
        License

Class to allow easy licensing of BioLuminate scripts

It is a violation of your software license to modify this class in any way.

Instance Methods [hide private]
 
__init__(self, license_type, num_tokens=1, version=93)
Create a License object.
 
__str__(self)
Create an informative string to print in debugging messages
 
isValid(self)
Check if the license is currently valid
 
checkin(self)
Return the license token.
 
__del__(self)
Return the license token when being deleted

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, license_type, num_tokens=1, version=93)
(Constructor)

 

Create a License object. License objects should be assigned to a variable that stays in scope for the duration the license token should be held. The accepted way to return a license token is by calling the checkin method of the license object, but the token will also be returned when the object is garbage collected.

Parameters:
  • license_type (module-level constant) - BIOLUMINATE_MAIN, BIOLUMINATE_SHARED, BIOLUMINATE_PROTEIN_DOCKING
  • num_tokens (int) - The number of tokens to check out
  • product_version - An integer value representing the product version. This is ten times the decimal value with the tenths digit, i.e. 93 for version 9.3.
  • version (int)
Overrides: object.__init__

__str__(self)
(Informal representation operator)

 

Create an informative string to print in debugging messages

Overrides: object.__str__

checkin(self)

 

Return the license token. After calling this method, the License object will report itself as invalid.