Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions {{ cookiecutter.format }}/{{ cookiecutter.class_name }}/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ int main(int argc, char *argv[]) {
wchar_t *wtmp_str;
wchar_t *app_packages_path_str;
const char* app_module_str;
const char* nslog_script;
PyObject *app_packages_path;
PyObject *app_module;
PyObject *module;
Expand Down Expand Up @@ -162,30 +161,6 @@ int main(int argc, char *argv[]) {
}

@try {
// Set the name of the python NSLog bootstrap script
nslog_script = [
[[NSBundle mainBundle] pathForResource:@"app_packages/nslog"
ofType:@"py"] cStringUsingEncoding:NSUTF8StringEncoding];
if (nslog_script == NULL) {
NSLog(@"No Python NSLog handler found. stdout/stderr will not be captured.");
NSLog(@"To capture stdout/stderr, add 'std-nslog' to your app dependencies.");
} else {
NSLog(@"Installing Python NSLog handler...");
FILE* fd = fopen(nslog_script, "r");
if (fd == NULL) {
crash_dialog(@"Unable to open nslog.py");
exit(-1);
}

ret = PyRun_SimpleFileEx(fd, nslog_script, 1);
fclose(fd);
if (ret != 0) {
crash_dialog(@"Unable to install Python NSLog handler");
exit(ret);
}
}


// Adding the app_packages as site directory.
//
// This adds app_packages to sys.path and executes any .pth
Expand Down Expand Up @@ -226,7 +201,6 @@ int main(int argc, char *argv[]) {
exit(-15);
}


// Start the app module.
//
// From here to Py_ObjectCall(runmodule...) is effectively
Expand Down
Loading