[Tutor] Let imported module access calling program

Shrutarshi Basu technorapture at gmail.com
Tue Mar 25 03:12:41 CET 2008

I'm working on a module-based robot interface, but I've hit a bit of a
roadblock. I would like the user's script to be able to simply import
modules and drive the robot. I want the users code to be executed once
every few seconds, but I don't want the timing system to be part of
the users code: the user should just define the robot's behavior which
is executed in a cyclic manner. I would like to make the timing and
repeating system a part of the module the user imports in their code,
but that means that the module has to be able to access functions
inside the calling program. Is there an easy way to do this? Or is
there a completely different solution that I'm not seeing? (I would
like to avoid something object-oriented, because that's a personal
challenge for me for this project: to explore new ways of

Embedded Architectures, Systems programming and outrageous ideas --

More information about the Tutor mailing list