Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Functions
start_python.hpp File Reference
#include <string>
+ Include dependency graph for start_python.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void shambindings::setpypath (std::string path)
 set the value of sys.path before init
 
void shambindings::set_sys_argv (int argc, char *argv[])
 set the value of sys.argv
 
void shambindings::setpypath_from_binary (std::string binary_path)
 set the value of sys.path before init from the supplied binary
 
void shambindings::start_ipython (bool do_print, int argc, char *argv[])
 Start shamrock embded ipython interpreter.
 
void shambindings::run_py_file (std::string file_path, bool do_print, int argc, char *argv[])
 run python runscript
 
void shambindings::modify_py_sys_path (bool do_print)
 Modify Python sys.path to point to one detected during cmake invocation.
 

Detailed Description

Author
Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)

Definition in file start_python.hpp.

Function Documentation

◆ modify_py_sys_path()

void shambindings::modify_py_sys_path ( bool  do_print)

Modify Python sys.path to point to one detected during cmake invocation.

This function will throw if bindings were not initialized in embed mode

Definition at line 96 of file start_python.cpp.

+ Here is the call graph for this function:

◆ run_py_file()

void shambindings::run_py_file ( std::string  file_path,
bool  do_print,
int  argc,
char *  argv[] 
)

run python runscript

This function will throw if bindings were not initialized in embed mode

Parameters
do_printprint log at python startup
file_pathpath to the runscript

Definition at line 142 of file start_python.cpp.

+ Here is the call graph for this function:

◆ set_sys_argv()

void shambindings::set_sys_argv ( int  argc,
char *  argv[] 
)

set the value of sys.argv

This function will throw if bindings were not initialized in embed mode

Definition at line 118 of file start_python.cpp.

+ Here is the call graph for this function:

◆ setpypath()

void shambindings::setpypath ( std::string  path)

set the value of sys.path before init

This function will throw if bindings were not initialized in embed mode

Definition at line 88 of file start_python.cpp.

+ Here is the call graph for this function:

◆ setpypath_from_binary()

void shambindings::setpypath_from_binary ( std::string  binary_path)

set the value of sys.path before init from the supplied binary

This function will throw if bindings were not initialized in embed mode

Definition at line 90 of file start_python.cpp.

+ Here is the call graph for this function:

◆ start_ipython()

void shambindings::start_ipython ( bool  do_print,
int  argc,
char *  argv[] 
)

Start shamrock embded ipython interpreter.

This function will throw if bindings were not initialized in embed mode

Warning
This function shall not be called if more than one processes are running
Parameters
do_printprint log at python startup

Definition at line 123 of file start_python.cpp.

+ Here is the call graph for this function: