(1) I run python by c:\Python25>Python <Enter>

Once in the interpreter, I can import the pygame modules, initialize Python,
make a window, but when I try to set the caption it won't work. I did get it
to work in the GUI, however.

pygame.display.set_caption('Monkey Fever')

(2) C:\Program Files\examples\data\chimp.bmp   "Is the path to the image"

When trying to load the image with:

monkey_head_file_name = os.path.join("data","chimp.bmp")
>>> print monkey_head_file_name                             "Creating
a relative Path"
data\chimp.bmp

monkey_surface = pygame.image.load(monkey_head_file_name)    "From the
tutorial...trying to load the image"






On 10/31/07, Ethan Glasser-Camp <[EMAIL PROTECTED]> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Michael George wrote:
> > Everything after the > is what you type at the dos prompt.  Everything
> > after the >>> is what you type at the python prompt.  Everything else is
> > what you should expect the system to respond
>
> It's a little more complicated than that, of course:
>
> >>     >>> file = open("file.txt")
> >>     >>> Traceback (etc...)
>
> You aren't supposed to type "Traceback (etc...)". Lukasz believes you
> may get a traceback here from an error (for example, a file-not-found
> error).
>
> >>     >>> [ctrl+d]
>
> This presumably means "press Ctrl-D" rather than "type [ctrl+d]". I'm
> not sure if this is correct; I thought on Windows, EOF is Ctrl-Z? But
> I wouldn't swear to it.
>
> >>     > cd files
> >>     > dir
> >>     file.txt
> >>     > python
> >>     >>> file = open("file.txt")    (and it work!)
>
> And here "(and it work!)" is presumably a comment.
>
> However, if I were you, Kevin Hayes, I would refine what I meant by
> "won't load". I believe Lukasz believes that you are getting "Cannot
> find file" errors, and he is trying to show you how to find your way
> around DOS and how your current directory interacts with Python.
>
> If you are getting file-not-found errors, it may help to explain your
> situation further -- what directory are you running Python from? What
> directory is chimp.bmp in? And so on.
>
> Ethan
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHKNS6hRlgoLPrRPwRAoQAAJsENCwdxB2zBNEWH5QYL91lPMva5gCfYatO
> NWVybH/zprshjUxUMHAMtOk=
> =DS9h
> -----END PGP SIGNATURE-----
>

Reply via email to