forked from jupyter-xeus/xeus-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxinternal_utils.hpp
43 lines (30 loc) · 1.49 KB
/
xinternal_utils.hpp
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
/***************************************************************************
* Copyright (c) 2018, Martin Renou, Johan Mabille, Sylvain Corlay, and *
* Wolf Vollprecht *
* Copyright (c) 2018, QuantStack *
* *
* Distributed under the terms of the BSD 3-Clause License. *
* *
* The full license is in the file LICENSE, distributed with this software. *
****************************************************************************/
#ifndef XPYT_INTERNAL_UTILS_HPP
#define XPYT_INTERNAL_UTILS_HPP
#include <vector>
#include "xeus/xcomm.hpp"
#include "pybind11/pybind11.h"
namespace py = pybind11;
namespace xpyt
{
py::module create_module(const std::string& module_name);
std::string red_text(const std::string& text);
std::string green_text(const std::string& text);
std::string blue_text(const std::string& text);
std::string highlight(const std::string& code);
py::list cpp_buffers_to_pylist(const xeus::buffer_sequence& buffers);
xeus::buffer_sequence pylist_to_cpp_buffers(const py::object& bufferlist);
py::object cppmessage_to_pymessage(const xeus::xmessage& msg);
std::string get_tmp_prefix();
std::string get_tmp_suffix();
std::string get_cell_tmp_file(const std::string& content);
}
#endif