Сергій wrote:
>
>
>
> <http://groups.yahoo.com/group/aima-talk/message/703;_ylc=X3oDMTJwdmFudGkyBF9TAzk3MzU5NzE1BGdycElkAzMwOTU0MjUEZ3Jwc3BJZAMxNjAwOTQ4OTIzBG1zZ0lkAzcwMwRzZWMDZG1zZwRzbGsDdm1zZwRzdGltZQMxMTU0MDEzNzc4>
>
>
> I am reading " Artificial Intelligence: A Modern Approach
> <javascript:if(confirm('http://aima.cs.berkeley.edu/ \n\nThis file was
> not retrieved by Teleport Pro, because it is addressed on a domain or
> path outside the boundaries set for its Starting Address. \n\nDo you
> want to open it from the
> server?'))window.location='http://aima.cs.berkeley.edu/'>" now
> (http://aima.cs.berkeley.edu/), and there are some ready python code
> from this book ( http://aima.cs.berkeley.edu/python/readme.html).
> And I have some problems with the code
> http://aima.cs.berkeley.edu/python/agents.py
> It is said in the http://aima.cs.berkeley.edu/python/agents.html:
>
> # GUI - Graphical User Interface for Environments
> # If you do not have Tkinter installed, either get a new installation of
> Python
> # (Tkinter is standard in all new releases), or delete the rest of
> this file
> # and muddle through without a GUI.
>
> I have python24.
> But just "*v = VacuumEnvironment(); w = EnvFrame(v);*" do nothing - I
> don't see any Graphical User Interface for Environments.
> What am I doing wrong and how to compel this piece of code to return a
> Graphical User Interface for Environments?
The entire last section of the code - from "import Tkinter as tk" to the
end - is enclosed in triple-quotes ('''). This makes it into a string
constant rather than code, effectively commenting it out. Try removing
the two lines that just contain '''.
Kent
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor