NEURON
nrnpython.cpp File Reference
#include <nrnpython.h>
#include <nrnpy_utils.h>
#include <stdio.h>
#include <InterViews/resource.h>
#include <nrnoc2iv.h>
#include <nrnpy_reg.h>
#include <hoccontext.h>
#include <string>
#include <ocfile.h>
#include <hocstr.h>

Go to the source code of this file.

Functions

void nrnpython_real ()
 
int nrnpython_start (int b)
 Start the Python interpreter. More...
 
int hoc_get_line ()
 
char * neuronhome_forward ()
 
static char * nrnpython_getline (FILE *, FILE *, const char *)
 
void nrnpy_augment_path ()
 
int nrnpy_pyrun (const char *fname)
 Execute a Python script. More...
 
void rl_stuff_char (int)
 
static void del_wcargv (int argc)
 
static void copy_argv_wcargv (int argc, char **argv)
 
static wchar_t * mywstrdup (char *s)
 

Variables

HocStrhoc_cbufstr
 
int nrnpy_nositeflag
 
char * nrnpy_pyhome
 
char * hoc_ctp
 
FILE * hoc_fin
 
const char * hoc_promptstr
 
int nrn_global_argc
 
char ** nrn_global_argv
 
int(* p_nrnpy_pyrun )(const char *)
 
static wchar_t ** wcargv
 

Function Documentation

◆ copy_argv_wcargv()

static void copy_argv_wcargv ( int  argc,
char **  argv 
)
static

Definition at line 107 of file nrnpython.cpp.

◆ del_wcargv()

static void del_wcargv ( int  argc)
static

Definition at line 97 of file nrnpython.cpp.

◆ hoc_get_line()

int hoc_get_line ( )

Definition at line 1869 of file hoc.cpp.

◆ mywstrdup()

static wchar_t* mywstrdup ( char *  s)
static

Definition at line 124 of file nrnpython.cpp.

◆ neuronhome_forward()

char* neuronhome_forward ( )

Definition at line 188 of file code2.cpp.

◆ nrnpy_augment_path()

void nrnpy_augment_path ( )

Definition at line 44 of file nrnpython.cpp.

◆ nrnpy_pyrun()

int nrnpy_pyrun ( const char *  fname)

Execute a Python script.

Returns
0 on failure, 1 on success.

Definition at line 69 of file nrnpython.cpp.

◆ nrnpython_getline()

static char * nrnpython_getline ( FILE *  ,
FILE *  ,
const char *  prompt 
)
static

Definition at line 230 of file nrnpython.cpp.

◆ nrnpython_real()

void nrnpython_real ( )

Definition at line 217 of file nrnpython.cpp.

◆ nrnpython_start()

int nrnpython_start ( int  b)

Start the Python interpreter.

defined(NRNPYTHON_DYNAMICLOAD)

  • b Mode of operation, can be 0 (finalize), 1 (initialize), or 2 (execute commands/scripts)
    Returns
    0 on success, non-zero on error
    There is an internal state variable that stores whether or not Python has been initialized. Mode 1 only has an effect if Python is not initialized, while the other modes only take effect if Python is already initialized.

Definition at line 140 of file nrnpython.cpp.

◆ rl_stuff_char()

void rl_stuff_char ( int  )

Variable Documentation

◆ hoc_cbufstr

HocStr* hoc_cbufstr

Definition at line 165 of file hoc.cpp.

◆ hoc_ctp

char* hoc_ctp

◆ hoc_fin

FILE* hoc_fin

◆ hoc_promptstr

const char* hoc_promptstr

Definition at line 166 of file hoc.cpp.

◆ nrn_global_argc

int nrn_global_argc

Definition at line 34 of file nrnpython.cpp.

◆ nrn_global_argv

char** nrn_global_argv

Definition at line 35 of file nrnpython.cpp.

◆ nrnpy_nositeflag

int nrnpy_nositeflag

Definition at line 193 of file ivocmain.cpp.

◆ nrnpy_pyhome

char* nrnpy_pyhome

Definition at line 80 of file nrnpy.cpp.

◆ p_nrnpy_pyrun

int(* p_nrnpy_pyrun) (const char *)

Definition at line 38 of file hoc.cpp.

◆ wcargv

wchar_t** wcargv
static

Definition at line 95 of file nrnpython.cpp.