libSBML Python API  5.18.0
printSupported.py

Prints the supported SBML Levels and Versions for this copy of libSBML.

1 #!/usr/bin/env python
2 ##
3 ## @file printsupported.cs
4 ## @brief Prints all SBML Levels and Versions supported by this version
5 ## of libsbml.
6 ## @author Frank Bergmann
7 ##
8 ##
9 ## <!--------------------------------------------------------------------------
10 ## This sample program is distributed under a different license than the rest
11 ## of libSBML. This program uses the open-source MIT license, as follows:
12 ##
13 ## Copyright (c) 2013-2018 by the California Institute of Technology
14 ## (California, USA), the European Bioinformatics Institute (EMBL-EBI, UK)
15 ## and the University of Heidelberg (Germany), with support from the National
16 ## Institutes of Health (USA) under grant R01GM070923. All rights reserved.
17 ##
18 ## Permission is hereby granted, free of charge, to any person obtaining a
19 ## copy of this software and associated documentation files (the "Software"),
20 ## to deal in the Software without restriction, including without limitation
21 ## the rights to use, copy, modify, merge, publish, distribute, sublicense,
22 ## and/or sell copies of the Software, and to permit persons to whom the
23 ## Software is furnished to do so, subject to the following conditions:
24 ##
25 ## The above copyright notice and this permission notice shall be included in
26 ## all copies or substantial portions of the Software.
27 ##
28 ## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29 ## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
30 ## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
31 ## THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32 ## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
33 ## FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
34 ## DEALINGS IN THE SOFTWARE.
35 ##
36 ## Neither the name of the California Institute of Technology (Caltech), nor
37 ## of the European Bioinformatics Institute (EMBL-EBI), nor of the University
38 ## of Heidelberg, nor the names of any contributors, may be used to endorse
39 ## or promote products derived from this software without specific prior
40 ## written permission.
41 ## ------------------------------------------------------------------------ -->
42 ##
43 
44 import sys
45 import os.path
46 from libsbml import *
47 
48 print("Supported by LibSBML " + getLibSBMLDottedVersion())
49 print()
50 supported = SBMLNamespaces.getSupportedNamespaces()
51 for i in range(0,supported.getSize()):
52  current = supported.get(i)
53  print("\tSBML Level: " + str(current.getLevel()) +
54  " Version: " + str(current.getVersion()))
55 print()