#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.
◆ copy_argv_wcargv()
| static void copy_argv_wcargv |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
|
static |
◆ del_wcargv()
| static void del_wcargv |
( |
int |
argc | ) |
|
|
static |
◆ hoc_get_line()
◆ mywstrdup()
| static wchar_t* mywstrdup |
( |
char * |
s | ) |
|
|
static |
◆ neuronhome_forward()
| char* neuronhome_forward |
( |
| ) |
|
◆ nrnmingw_pyrun_interactiveloop()
| static int nrnmingw_pyrun_interactiveloop |
( |
| ) |
|
|
static |
Like a PyRun_InteractiveLoop that does not need a FILE* Use InteractiveConsole to work around the issue of mingw FILE* not being compatible with Python via the CAPI on windows11.
- Returns
- 0 on success, nonzero on failure.
Definition at line 101 of file nrnpython.cpp.
◆ nrnpy_augment_path()
| void nrnpy_augment_path |
( |
| ) |
|
◆ 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 |
◆ nrnpython_real()
◆ 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 161 of file nrnpython.cpp.
◆ rl_stuff_char()
| void rl_stuff_char |
( |
int |
| ) |
|
◆ hoc_cbufstr
◆ hoc_ctp
◆ hoc_fin
◆ hoc_promptstr
| const char* hoc_promptstr |
|
extern |
◆ nrn_global_argc
◆ nrn_global_argv
◆ nrnpy_nositeflag
◆ nrnpy_pyhome
◆ p_nrnpy_pyrun
| int(* p_nrnpy_pyrun) (const char *) |
( |
const char * |
fname | ) |
|
|
extern |
◆ wcargv