FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
libdiffpy/src/diffpy/PythonInterface.hpp at develop · cfarrow/libdiffpy · GitHub
cfarrow
libdiffpy
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
libdiffpy
/
src
/
diffpy
/
PythonInterface.hpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
46 lines (36 loc) · 1.41 KB
Breadcrumbs
libdiffpy
/
src
/
diffpy
/
PythonInterface.hpp
Copy path
File metadata and controls
46 lines (36 loc) · 1.41 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
****************************************************************************
*
* diffpy.srreal by DANSE Diffraction group
* Simon J. L. Billinge
* (c) 2009 Trustees of the Columbia University
* in the City of New York. All rights reserved.
*
* File coded by: Pavol Juhas
*
* See AUTHORS.txt for a list of people who contributed.
* See LICENSE.txt for license information.
*
******************************************************************************
*
* Common functions for interfacing with Python interpreter.
*
****************************************************************************
*/
#
ifndef
PYTHONINTERFACE_HPP_INCLUDED
#
define
PYTHONINTERFACE_HPP_INCLUDED
#
include
<
boost/python.hpp
>
#
include
<
string
>
namespace
diffpy
{
//
routines
void
initializePython
(
int
py_argc=
0
,
char
* py_argv[]=
NULL
);
std::string
getPythonErrorString
();
//
/ Obtain object from specified Python module.
//
/ Throw error_already_set on import error.
boost::python::object
importFromPyModule
(
const
std::string& modname,
const
std::string& item);
//
/ Obtain object from specified Python module. When there are any errors,
//
/ ignore them and return the fallback object.
boost::python::object
importFromPyModule
(
const
std::string& modname,
const
std::string& item,
boost::python::object fallback);
}
//
namespace diffpy
#
endif
//
PYTHONINTERFACE_HPP_INCLUDED
Back
|
FazBrowse Home
|
New Git URL