What does Python do
Grant Edwards
grante at visi.com
Tue Jan 23 11:28:07 EST 2001
In article <3A6D1E04.AABCC7DE at engcorp.com>, Peter Hansen wrote:
>> There are some things for which C is still more applicable than
>> Python: low-level programming such as real-time embedded
>> systems and device drivers where C is used as a "portable
>> assembler". OTOH, I don't consider C applicable for GUI
>> application development (Python is).
>>
>> Since beginners aren't generally doing real-time embedded SW or
>> device drivers, I concur that Python is probably the best
>> language (of the ones I know) for a beginner.
>
>Actually, Python can be suitable for real-time embedded
>software, as well.
I suppose it depends on the system resources and requirements.
The vast majority of embedded systems don't have the resources
required to run Python -- even the deeply embedded version
without the compiler.
>(I suppose I could even stretch things a little and say it's
>potentially suitable for device drivers, but not in the way
>most people would define them.)
You can't write a device driver in Python for any of the common
desktop or server OSes: Linux, BSD, Solaris, MacOS, Win*, etc.
It's entirely possible to design an OS such that kernel/driver
code can be in Python, but I'm not aware of such a thing.
Extrapolating even further, you could put the PVM into silicon.
>Python is actually *more* suitable for real-time work, in
>certain circumstances, than Java.
A lot of real-time system designers cringe at _any_ use of
dynamic memory allocation (other than a frame stack). Dynamic
_anything_ is the bane of an embedded system. Although Java
was supposed to be useful for embedded systems, it's been a
tough sell.
>For example, it seems to be a little more deterministic
>(without the garbage collection). On the other hand the
>threading model could mess things up for you, but if you focus
>on a specific platform, even that is not necessarily a problem.
The current threading implementation is inappropriate for
real-time work, but I don't know why one couldn't implement
prioritized preemptive threading for Python.
--
Grant Edwards grante Yow! Hold the MAYO & pass
at the COSMIC AWARENESS...
visi.com
More information about the Python-list
mailing list