1 /** 2 Mirror _sysmodule.h 3 4 System module interface 5 */ 6 module deimos.python.sysmodule; 7 8 import core.stdc.stdio; 9 import core.stdc.stddef : wchar_t; 10 11 import deimos.python.pyport; 12 import deimos.python.object; 13 14 extern(C): 15 // Python-header-file: Include/sysmodule.h: 16 17 /// _ 18 PyObject* PySys_GetObject(const(char)*); 19 /// _ 20 int PySys_SetObject(const(char)*, PyObject*); 21 version(Python_3_0_Or_Later) { 22 /// Availability: 3.* 23 void PySys_SetArgv(int, wchar_t**); 24 /// Availability: 3.* 25 void PySys_SetArgvEx(int, wchar_t**, int); 26 /// Availability: 3.* 27 void PySys_SetPath(wchar_t*); 28 }else{ 29 /// Availability: 2.* 30 FILE* PySys_GetFile(char*, FILE*); 31 /// Availability: 2.* 32 void PySys_SetArgv(int, char**); 33 /// Availability: 2.* 34 version(Python_2_6_Or_Later){ 35 /// Availability: >= 2.6 36 void PySys_SetArgvEx(int, char**, int); 37 } 38 /// Availability: 2.* 39 void PySys_SetPath(char*); 40 } 41 42 /// _ 43 void PySys_WriteStdout(const(char)* format, ...); 44 /// _ 45 void PySys_WriteStderr(const(char)* format, ...); 46 version(Python_3_2_Or_Later) { 47 /// Availability: >= 3.2 48 void PySys_FormatStdout(const(char)* format, ...); 49 /// Availability: >= 3.2 50 void PySys_FormatStderr(const(char)* format, ...); 51 } 52 53 /// _ 54 mixin(PyAPI_DATA!"PyObject* _PySys_TraceFunc"); 55 /// _ 56 mixin(PyAPI_DATA!"PyObject** _PySys_ProfileFunc"); 57 58 /// _ 59 void PySys_ResetWarnOptions(); 60 version(Python_3_0_Or_Later) { 61 /// Availability: 3.* 62 void PySys_AddWarnOption(const(wchar_t)*); 63 version(Python_3_2_Or_Later) { 64 /// Availability: >= 3.2 65 void PySys_AddWarnOptionUnicode(PyObject*); 66 } 67 }else{ 68 /// Availability: 2.* 69 void PySys_AddWarnOption(char*); 70 } 71 version(Python_2_6_Or_Later){ 72 /// Availability: >= 2.6 73 int PySys_HasWarnOptions(); 74 } 75 version(Python_3_2_Or_Later) { 76 /// Availability: >= 3.2 77 void PySys_AddXOption(const(wchar_t)*); 78 /// Availability: >= 3.2 79 PyObject* PySys_GetXOptions(); 80 } 81 82