Lattice Microbes 2.5
This is for whole cell modeling
Loading...
Searching...
No Matches
lm_python.cpp File Reference
#include <fstream>
#include <iostream>
#include <list>
#include <string>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <sys/stat.h>
#include <google/protobuf/stubs/common.h>
#include <Python.h>
#include "core/Exceptions.h"
#include "core/Print.h"
#include "lptf/Profile.h"
#include "core/util.h"
#include "lm_module_pack.h"
Include dependency graph for lm_python.cpp:

Classes

class  Print
 Print messages to the console at varying levels of verbosity. More...

Macros

#define STRING   std::wstring
#define CHAR   wchar_t
#define TO_PY_STR(x)
#define STRLITERAL(x)
#define STRCPY(x, y)

Functions

wstring mkwStr (const char *str)
void parseArguments (int argc, char **argv)
void printUsage (int argc, char **argv)
void discoverEnvironment ()
void initPython ()
void finalizePython ()
void startInterpreter ()
void executeScript (string filename, list< string > arguments)
PyObject * PyInit__lm (void)
int main (int argc, char **argv)
void executeScript (string filename, std::list< string > arguments)

Variables

string function = ""
string scriptFilename = ""
list< string > scriptArguments
STRING libDir_forPy
string libDir
STRING userLibDir
 PROF_ALLOC

Macro Definition Documentation

◆ CHAR

#define CHAR   wchar_t

◆ STRCPY

#define STRCPY ( x,
y )
Value:
wcscpy(x,y)

◆ STRING

#define STRING   std::wstring

◆ STRLITERAL

#define STRLITERAL ( x)
Value:
L##x

◆ TO_PY_STR

#define TO_PY_STR ( x)
Value:
wstring mkwStr(const char *str)
Definition lm_python.cpp:61

Function Documentation

◆ discoverEnvironment()

void discoverEnvironment ( )

Figures out the environment for the program (directories, files, etc).

◆ executeScript() [1/2]

void executeScript ( string filename,
list< string > arguments )
Here is the caller graph for this function:

◆ executeScript() [2/2]

void executeScript ( string filename,
std::list< string > arguments )
Here is the call graph for this function:

◆ finalizePython()

void finalizePython ( )
Here is the caller graph for this function:

◆ initPython()

void initPython ( )

Starts the python interpreter.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int argc,
char ** argv )
Here is the call graph for this function:

◆ mkwStr()

wstring mkwStr ( const char * str)

◆ parseArguments()

void parseArguments ( int argc,
char ** argv )

Parses the command line arguments.

Here is the caller graph for this function:

◆ printUsage()

void printUsage ( int argc,
char ** argv )

Prints the usage for the program.

Here is the caller graph for this function:

◆ PyInit__lm()

PyObject * PyInit__lm ( void )
Here is the caller graph for this function:

◆ startInterpreter()

void startInterpreter ( )
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ function

string function = ""

The function being performed.

◆ libDir

string libDir

◆ libDir_forPy

STRING libDir_forPy

The directory containing the supporting files.

◆ PROF_ALLOC

PROF_ALLOC

◆ scriptArguments

list<string> scriptArguments

The arguments for the script, if applicable.

◆ scriptFilename

string scriptFilename = ""

The script filename being executed, if applicable.

◆ userLibDir

STRING userLibDir

The directory containing the supporting files.