-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy path_systemrestart.java
More file actions
29 lines (26 loc) · 1017 Bytes
/
Copy path_systemrestart.java
File metadata and controls
29 lines (26 loc) · 1017 Bytes
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
package org.python.modules;
import org.python.core.ClassDictInit;
import org.python.core.Py;
import org.python.core.PyException;
import org.python.core.PyObject;
import org.python.core.PyStringMap;
public class _systemrestart implements ClassDictInit {
/**
* Jython-specific exception for restarting the interpreter. Currently
* supported only by jython.java, when executing a file (i.e,
* non-interactive mode).
*
* WARNING: This is highly *experimental* and subject to change.
*/
public static PyObject SystemRestart;
public static void classDictInit(PyObject dict) {
SystemRestart = Py.makeClass(
"_systemrestart.SystemRestart", Py.BaseException,
new PyStringMap() {{
__setitem__("__doc__",
Py.newString("Request to restart the interpreter. " +
"(Jython-specific)"));
}});
dict.__delitem__("classDictInit");
}
}