diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2016-10-08 23:32:06 -0600 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2016-11-12 15:45:56 -0700 |
commit | 6766de6c893d5300bac773bbd654c5af06c2ab66 (patch) | |
tree | 29100618599099795586b79faba08d3a85e7e112 /src/chill.cc | |
parent | ffe133a194e36ecbe060f08d132339b437975ea6 (diff) | |
download | chill-6766de6c893d5300bac773bbd654c5af06c2ab66.tar.gz chill-6766de6c893d5300bac773bbd654c5af06c2ab66.tar.bz2 chill-6766de6c893d5300bac773bbd654c5af06c2ab66.zip |
switch to pythonlibs 3
Diffstat (limited to 'src/chill.cc')
-rw-r--r-- | src/chill.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/chill.cc b/src/chill.cc index 9901fab..45d53f1 100644 --- a/src/chill.cc +++ b/src/chill.cc @@ -35,14 +35,15 @@ int main(int argc, char *argv[]) { // Create PYTHON interpreter /* Pass argv[0] to the Python interpreter */ - Py_SetProgramName(argv[0]); - - /* Initialize the Python interpreter. Required. */ - Py_Initialize(); + wchar_t *program = Py_DecodeLocale(argv[0], NULL); + Py_SetProgramName(program); /* Add a static module */ initchill(); + /* Initialize the Python interpreter. Required. */ + Py_Initialize(); + if (argc == 2) { FILE *f = fopen(argv[1], "r"); if (!f) { |