scripts.example_script
EXAMPLE SCRIPT.
Example demonstrating how to call code API as an executable script.
Examples
To see the available arguments run:
bash
example_script.py -h
For example, to calculate the luminosity of the Sun:
bash
example_script.py --radius 7e8 --eff_temp 5800
-
get_args()[source] -
Get Script Arguments.
- Returns
Command line arguments
- Return type
-
call_hello()[source] -
Call Hello World.
This function calls the
hello_worldfunction and prints the output.pyraliddemo.example.hello.hello_worldImplementation of the
hello_worldfunction.
-
call_stefboltz(radius: float, eff_temp: float)[source] -
Call StefBoltz.
This function calls the
StefBoltzclass and prints the luminosity corresponding to the radius and effective temperature provided.pyraliddemo.example.classes.StefBoltzImplementation of the
StefBoltzclass.
-
run_steps()[source] -
Call Script Steps.
This is the main method called by the script. It runs the various steps involved.