# Adding char\* based APIs for Unix

**URL:** <https://discuss.python.org/t/adding-char-based-apis-for-unix/916>\
**Category:** Python Help\
**Created:** [February 20, 2019, 3:53am UTC](https://discuss.python.org/t/adding-char-based-apis-for-unix/916 "2019-02-20T03:53:39Z")\
**Posts on this page:** 1\
**Showing post:** 22

<div class="post-metadata">

**Author:** ![vstinner](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/vstinner/32/15130_2.png) [@vstinner](https://discuss.python.org/u/vstinner)\
**Post date:** [March 4, 2019, 2:54pm UTC](https://discuss.python.org/t/adding-char-based-apis-for-unix/916/22 "2019-03-04T14:54:50Z")

</div>

> [@ncoghlan](#):
>
> Even if you call `Py_Initialize` and then `Py_Main` , it isn’t quite the same thing, since not everything gets reconfigured after `Py_Main` has had a chance to look at the command line arguments.

Yeah, right now, almost all the new “configuration” read by Py\_Main() is ignored and will not be applied. Python keeps the “old” configuration read by Py\_Initialize().

The problem is that many Python objects are kept alive between Py\_Initialize() and Py\_Main(). For this reason, it’s not possible to change the memory allocator in such case.

I would suggest to deprecate calling Py\_Initialize() before Py\_Main().

---

_[View the full topic](https://discuss.python.org/t/adding-char-based-apis-for-unix/916)._
