You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ ptpython
In [1]: from ctypes import CDLL
In [2]: libc = CDLL('libc.so.6')
In [3]: libc.printf(b"hello")
5
In [4]: # press <C-D> to exit
hello
For python
$ python
Python 3.10.12 (main, Jun 6 2023, 22:43:10) [GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ctypes import CDLL
>>> libc = CDLL('libc.so.6')
>>> libc.printf(b'hello')
5
hello>>>
Why they are different? How to make them same? TIA!
The text was updated successfully, but these errors were encountered:
ptpython only output when it exit:
For python
Why they are different? How to make them same? TIA!
The text was updated successfully, but these errors were encountered: