ita2048 ita2048 commented on a discussion: https://gitlab.rtems.org/rtems/docs/rtems-docs/-/merge_requests/104#note_119604 `os.popen` is an alias for `subprocess.Popen(cmd, shell=True, text=True, stdout=subprocess.PIPE, bufsize=-1)`. Both `os.popen` and `task.exec_command` call `Popen.communicate()` and wait for the process to terminate. The main differences that the changes bring is the removal of `stderr` and setting `text=True`. Unless setting a standard error causes an issue, passing `task.exec_command(cmd, stdout = so, stderr = se, text=True)` should have the same effect. Alternatively, the output files may need to be opened in binary mode `so = open(tgt, 'wb')` instead of text mode `so = open(tgt, 'w')`. -- View it on GitLab: https://gitlab.rtems.org/rtems/docs/rtems-docs/-/merge_requests/104#note_119604 You're receiving this email because of your account on gitlab.rtems.org.
_______________________________________________ bugs mailing list [email protected] http://lists.rtems.org/mailman/listinfo/bugs
