1#include "pry_python2.h"
3int pry_eval_file(FILE *f, const char *file, int argn, const char *argv)
5 const char *xargv[argn + 1];
6 const char *ptr = argv;
7 for (int i = 0; i < argn; ++i)
10 ptr += strlen(ptr) + 1;
13 PySys_SetArgvEx(argn, xargv, 1);
14 return PyRun_AnyFile(f, file);
17const char *pry_eval(const char *code, int start)
20 PyObject *m, *d, *s, *v;
22 m = PyImport_AddModule("__main__");
27 d = PyModule_GetDict(m);
28 c = Py_CompileString(code, "(eval)", start);
34 v = PyEval_EvalCode(c, d, d);
46 char *str = PyBytes_AS_STRING(s);
52void pry_set_prompts(const char *ps1, const char *ps2)
54 PyObject *po1 = PyString_FromString(ps1);
55 PyObject *po2 = PyString_FromString(ps2);
56 PySys_SetObject("ps1", po1);
57 PySys_SetObject("ps2", po2);
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list