Liste des Groupes | Revenir à cl c |
David Brown <david.brown@hesbynett.no> writes:There are /always/ ways to get around things (especially on Linux, where you have such "backdoors"). That is why I said Python does not support low-level programming to any /significant/ degree. "low-level" vs. "high-level" is not a binary distinction. Typically if you have Python code controlling some hardware, it is via a Python module with a C implementation, or with ctypes and an external shared library - not directly from Python.On 27/08/2024 06:36, Lawrence D'Oliveiro wrote:I've used Python's mmap module to access /dev/kmem on an embeddedOn Mon, 26 Aug 2024 15:46:02 +0200, David Brown wrote:>
>Wikipedia classifies C as a high-level language that also supports aThe same could be said of Python.
degree of low-level programming, which I think is a fair assessment.
Python does not support any significant degree of low-level programming.
>
A key example of low-level programming is control of hardware, which
on most systems means accessing memory-mapped registers at specific
addresses, reading and writing in specific orders. Python has no
means to do any of that - C and C++ both provide this ability.
(Micropython, a subset of Python targeting microcontrollers and small
systems, has library modules that can do this.)
Linux system, accessing fixed addresses defined by an FPGA image.
(The mmap module happens to be part of the core Python distribution.)
This is one of several reasons why we have different newsgroups forSure. It's not really the place to get into details of other languages, but it is a thread that compares C to other languages.
different langauges.
Les messages affichés proviennent d'usenet.