[Tinyos-help] import tinyos-2.x in python

Wouter Horré wouter.horre at cs.kuleuven.be
Mon Mar 5 04:18:04 PST 2007


On Monday 05 March 2007 12:33, fatima cabot wrote:
> Hi. I'm  trying to interact between python and TOSSIM (tinyos 2). How can
> you tell python to import the TOSSIM.py file which is in
> /opt/tinyos-2.x/apps/<appdir>?I
> get errors because of the '-2.x' sequence. Is there any way of scaping
> characters (I mean by "\character") or of making import recognise an
> environment variable, maybe a $TOSROOT=/opt/tinyos-2.x

Environment variables can be accessed in python via the os packages:

import os
print os.environ.get("TOSROOT")

regards
Wouter


More information about the Tinyos-help mailing list