<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>success</status>
  <result>
    <project>
      <id>22233</id>
      <name>pastiche</name>
      <created_at>2008-10-07T14:37:43Z</created_at>
      <updated_at>2008-10-07T23:38:51Z</updated_at>
      <description>The pastiche software framework brings a variety of technologies together, like semantic web, multi-agent and distributed systems. It is designed for ease of use and fun. 

 

This is a continuation of previous work done on Spyse. 

Still thinking about a number of ideas. 

#!/usr/bin/env python

"""Hello World example program from the Spyse tutorial"""

from spyse.core.agents.agent import Agent
from spyse.core.behaviours.behaviours import Behaviour
from spyse.app.app import App

# Define a custom behaviour class
class HelloBehaviour(Behaviour):
    # Customize the Behaviour class by overriding action()
    def action(self):
        # The action:
        print "Hello, world"
        # Mark this behaviour as finished so that it will be removed
        # from the agent's behaviour list.
        self.set_done()

# Define a custom agent class
class HelloAgent(Agent):
    # Customize the Agent class by overriding setup()
    def setup(self):
        # Add the custom behaviour for the agent to perform.
        # An agent will die as soon as all its behaviours are complete.
        self.add_behaviour(HelloBehaviour())

# Define a custom application class
class MyApp(App):
    # Customize it by overriding run()
    def run(self, args):
        self.start_agent(HelloAgent)

# Instantiate and run MyApp
if __name__ == "__main__":
    MyApp()</description>
      <homepage_url>http://code.google.com/p/pastiche</homepage_url>
      <download_url></download_url>
      <url_name>pastiche</url_name>
      <user_count>0</user_count>
      <average_rating></average_rating>
      <rating_count>0</rating_count>
      <analysis_id>280248</analysis_id>
      <analysis>
        <id>280248</id>
        <project_id>22233</project_id>
        <updated_at>2009-11-27T17:44:55Z</updated_at>
        <logged_at>2009-11-27T17:44:51Z</logged_at>
        <min_month>2008-05-01T00:00:00Z</min_month>
        <max_month>2008-07-01T00:00:00Z</max_month>
        <twelve_month_contributor_count>1</twelve_month_contributor_count>
        <total_code_lines>1220</total_code_lines>
        <main_language_id>9</main_language_id>
        <main_language_name>Python</main_language_name>
      </analysis>
      <licenses>
        <license>
          <name>gpl</name>
          <nice_name>GNU General Public License 2.0</nice_name>
        </license>
      </licenses>
    </project>
  </result>
</response>
