On Mon, October 29, 2007 8:20 pm, John Mark Swafford said:
> Dear Users,
>
>     Thanks for you suggestions so far; they have been very helpful.
> Unfortunately I am still having problems getting my pyrobot code to work
> directly from my python program without the GUI. I believe I am very
> close to finding my solution. Everytime I try and call my pyrobot code,
> I receive an "ImportError: No module named X" I tried moving the code to
> the pyrobot directory and then executing it and I still receive the same
> error. I also tried adding the directory where pyrobot is to my
> PYTHONPATH with the same result. When adding to my PYTHONPATH, I tried
> adding the sys.path.append command to my python code and I tried adding
> the line:
> export PYTHONPATH = dir/where/pyrobot/is to my .bash_profile.  I am
> working with OS X if that makes any difference. Has anyone encountered a
> similar problem? Any advice would be greatly appreciated.

John Mark,

Here is a test I just did to show everything one would need to do to run.
This is under Linux, but should work under any UNIX. The dollar sign is
the shell prompt; you enter what follows the dollar sign. I retrieve the
files, build, and run (you may have already downloaded the files, so you
could skip the cvs commands):

$ pwd
/home/dblank
$ cvs -d :pserver:[EMAIL PROTECTED]:/cvs login
Logging in to :pserver:[EMAIL PROTECTED]:2401/cvs
CVS password: [PRESS ENTER]
$ cvs -d :pserver:[EMAIL PROTECTED]:/cvs co pyrobot
cvs server: Updating pyrobot
... [takes a couple of minutes to get all files]
$ cd pyrobot
$ make
-------------------------------------------------------------------
1. Python version number?
Default = [2.5]:  [ENTER]
-------------------------------------------------------------------
2. Where are Python's include files?
Default = [/usr/include/python2.5]:  [ENTER]
-------------------------------------------------------------------
3. What is Python's binary? (enter path and name)
Default = [/usr/bin/python2.5]: [ENTER]
-------------------------------------------------------------------
4. Where is the X11 include directory?
Default = []:  /usr/share/X11/
-------------------------------------------------------------------
 5. Where is the player include directory (if one, or 'none')?
Default = []:  none

[Answer n for all of the rest of the questions.]

Configuration is complete!

You just created Makefile.cfg. You can run this again, or edit
Makefile.cfg by hand if you need to.

Now you are ready to run 'make' (if you aren't already)

echo -e "# This file is automatically generated\ndef version():\n\treturn
\"5.0.0\"" > system/version.py
/usr/bin/python2.5 compile.py
Listing . ...

[Compiles a bunch of files.]

echo -e "#!/usr/bin/python2.5" > bin/pyrobot
cat build/pyrobot >> bin/pyrobot
chmod a+x bin/pyrobot

$ export PYTHONPATH=/home/dblank
$ export PYROBOT=/home/dblank/pyrobot
$ python
Python 2.5 (r25:51908, Apr 10 2007, 10:29:13)
[GCC 4.1.2 20070403 (Red Hat 4.1.2-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyrobot
>>> from pyrobot.simulators.pysim import *
>>> from pyrobot.robot.symbolic import Simbot
>>> ^d

Does that fail at any place?

-Doug

> Kind Regards,
> John Mark Swafford
> Allegheny College


_______________________________________________
Pyro-users mailing list
[email protected]
http://emergent.brynmawr.edu/mailman/listinfo/pyro-users

Reply via email to