HARD REAL TIME PYTHON

James Mills prologic at shortcircuit.net.au
Wed Oct 8 00:35:41 CEST 2008


On Tue, Oct 7, 2008 at 6:42 PM,  <bieffe62 at gmail.com> wrote:
> AFAIK, the requirement for hard real time, is that response time have
> to be predictable, rather than
> generally 'fast'.
> Very high level languages like python use many features which are by
> their nature unpredictable or
> difficult to predict in their response times: to name a pair, garbage
> collection and hash table lookups.
> Usually real time programmers tend not to use these features even when
> they program with lower level
> languages such as C, ot at least to use them only during
> initialization, when being predictable is less
> important.
>
> So no, I would not use python for hard real time ...
> Said that, I have to say that once used python to simulate  the
> protocol of a device which my code (in ADA) had to interface. Typical
> response times in this protocol was about 10ms, and my small python
> simulator usually managed to respond in that time, although sometime
> it delayed its response causing the response timeout in my code to
> expire ...

I guess the real question here is what
the OP's requirements actually are.
What is he trying to build ? What are the
timing constraints ? What other constraints
are there ? Just asking whether or not
Python _can_ be used for real-time programming
is a pointless exercise. Even given that
Python may have some unpredictable
features about it being such a high level
language, I am sure it's possible to use
Python in real-time situations.

Blubaugh: What is it that you are trying to achieve ?

cheers
James

-- 
--
-- "Problems are solved by method"



More information about the Python-list mailing list