Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Some small changes to the Python support documentation that clarifies…

… something that was ambiguous and cleans up a typo.
  • Loading branch information...
commit ce3cc97e33f40471de5646f91645ccf8db8ac134 1 parent 06609d9
Grayson Hansard authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 documentation/Python support.markdown
4 documentation/Python support.markdown
Source Rendered
@@ -115,9 +115,9 @@ Since there were no parameters, you can simply toss `nil` into `PyObject_CallObj
115 115
116 116 ## A note about Py_Initialize()
117 117
118   -In all of these examples, I've shown `Py_Initialize()` as the first item to do. However, I read on some mailing lists that it is inefficient to call it multiple times in a program. Worse, it may have a memory leak in it (again, according to mailings lists). If you plan on running multiple files, you can simply load them as you normally would and use them.
  118 +In all of these examples, I've shown `Py_Initialize()` as the first item to do. However, I read on some mailing lists that it is inefficient to call it multiple times in a program. Worse, it may have a memory leak in it (again, according to mailings lists). If you plan on running multiple files, you can simply call `Py_Initialize()` once early on then repeat the following steps for each file.
119 119
120   -If you plan on doing this, do not call `Py_Finalize()` until you are done using the Python interpreter. I haven't tried it yet, but I expect that if you call `Py_Finalize()` and then try to call Python functions and whatnot, bad things could happen. You should, of course, call `Py_Finalize()` when you are done with the interpreter, but if the Python interpreter be running during the entire application, I don't suppose there's much harm in just forgetting about it and letting it get cleaned up with everything else when the user quits your app.
  120 +If you plan on doing this, do not call `Py_Finalize()` until you are done using the Python interpreter. I haven't tried it yet, but I expect that if you call `Py_Finalize()` and then try to call Python functions and whatnot, bad things could happen. You should, of course, call `Py_Finalize()` when you are done with the interpreter, but if the Python interpreter will be running during the entire lifetime of the application, I don't suppose there's much harm in just forgetting about it and letting it get cleaned up with everything else when the user quits your app.
121 121
122 122 ## Converting PyObjects into their Cocoa equivalents and vice versa
123 123

0 comments on commit ce3cc97

Please sign in to comment.
Something went wrong with that request. Please try again.