Belinda,
I don't remember the details, but I know that pyrobot stores the string
argument to -a in gui.engine.args . You'll have to parse it, maybe
something like:
args = gui.engine.args.split(",")
for a in args:
name, value = a.split.("=")
I forget how you get the gui object from a brain (I'm on the road right
now), but maybe that will give you a pointer. More later...
-Doug
On Thu, March 8, 2007 10:25 pm, belinda thom said:
> Hi,
>
> I asked this question a couple months ago, and didn't get an answer,
> so I'm trying again.
>
> Hw can one pass info into a world file from the command line?
>
> For instance, if I try:
>
> 42 % pyrobot -a foo=test -s PyrobotSimulator -w BsWorld.py -r
> PyrobotRobot60000 -b BraitenbergVehicle1.py &
> [1] 5536
>
> and then put an
>
> import sys
> print sys.argv
>
> into my world file, and i see:
>
> ['/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> site-packages/pyrobot/plugins/simulators/PyrobotSimulator',
> '5536', 'BsWorld.py']
>
> which looses the info about foo=test that the -a argument passes to
> something.
>
> Thanks,
>
> --b
> _______________________________________________
> Pyro-users mailing list
> [email protected]
> http://emergent.brynmawr.edu/mailman/listinfo/pyro-users
>
--
Douglas S. Blank
Associate Professor, Bryn Mawr College
http://cs.brynmawr.edu/~dblank/
Office: 610 526 6501
_______________________________________________
Pyro-users mailing list
[email protected]
http://emergent.brynmawr.edu/mailman/listinfo/pyro-users