A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/attachments/20180108/99942a1e/attachment.html below:

<span>Hi,</span><div><br></div><div>I'm currently working on exposing posix_spawn in the posix module (and by extension in the os module). You can find the initial implementation in this PR:</div><div><br></div><div><a href="https://github.com/python/cpython/pull/5109">https://github.com/python/cpython/pull/5109</a><br></div><div><br></div><div>As pointed out by Gregory P. Smith, some changes are needed in the way the file_actions arguments is passed from Python. For context, posix_spawn has the following declaration:</div><div><br></div><div>int posix_spawn(pid_t *pid, const char *path,<br>                       const posix_spawn_file_actions_t *file_actions,<br>                       const posix_spawnattr_t *attrp,<br>                       char *const argv[], char *const envp[]);<br></div><div><br></div><div>Here, file_actions is an object that represents a list of file actions (open, close or dup2) that is populated using helper functions on the C API.</div><div><br></div><div>The question is: what is the best way to deal with this argument?</div><div><br></div><div>Following Gregory's comment on the PR I understand that he is proposing to have three objects in the os module representing each action and pass a sequence of these objects to the Python API. What I am not sure about this is that there is no previous example of such classes in the os module for other similar APIs and therefore I am not sure if there is a better approach.</div><div><br></div><div>Thanks you very much for your time!</div><div><br></div><div>Pablo Galindo</div>

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4