This just started working for me today. It's not that intuitive, but
easy once you understand.

First, you need your image. PNG, GIF, JPG, doesn't matter.

For examples: my project is a dice roller robot. It is located in a
directory called "So-Random", which my main.py etc.

Create a folder in your main project named "assets". (Mine is /So-
Random/assets/profile.png)

Then, open your app.yaml. This is where I was screwing up. Imagine
this file creates "shortcuts" that get parsed from the top down. Since
our image is a static file, we need to specify we'd like it to be
uploaded, and to where. Along with that, any requests from the
webserver will follow these rules when looking for static files.

Every app.yaml should start with something close to:

- url: .*
  script: main.py

If that is the FIRST entry, and we add anything after it, then all our
*.jpgs and *.gifs will instead redirect to main.py. If you don't
understand why, read this: 
http://code.google.com/appengine/docs/python/config/appconfig.html

So, we need to add a rule BEFORE the wildcard that tells where to get
our robots picture. In our example, this is what we should have:

application: so-random
version: 1
runtime: python
api_version: 1

handlers:
- url: /assets
  static_dir: assets
- url: .*
  script: main.py

Then, finally, the code inside our main.py. I'm not going to get deep
into explaining this, as it's rather self-explanatory:

if __name__ == '__main__':
  myRobot = robot.Robot('SO',
      image_url='http://so-random.appspot.com/assets/profile.png',
      version='1.0973',
      profile_url='http://so-random.appspot.com/')

So the "image_url" should specify that your image be loaded from /
assets/imagename

There you go!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Wave API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-wave-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to