Run multiple spiders from script in scrapy
<p>I am doing scrapy project I want run multiple spiders at a time 
This is code for run spiders from script. I getting error .. how to do </p>

<pre><code> from spiders.DmozSpider import DmozSpider
 from spiders.CraigslistSpider import CraigslistSpider

 from scrapy import signals, log
 from twisted.internet import reactor
 from scrapy.crawler import Crawler
 from scrapy.settings import Settings

 TO_CRAWL = [DmozSpider, CraigslistSpider]


 RUNNING_CRAWLERS = []

def spider_closing(spider):
"""Activates on spider closed signal"""
log.msg("Spider closed: %s" % spider, level=log.INFO)
RUNNING_CRAWLERS.remove(spider)
if not RUNNING_CRAWLERS:
    reactor.stop()
</code></pre>

<p>log.start(loglevel=log.DEBUG)
   for spider in TO_CRAWL:
      settings = Settings()</p>

<pre><code> # crawl responsibly
 settings.set("USER_AGENT", "Kiran Koduru (+http://kirankoduru.github.io)")
 crawler = Crawler(settings)
 crawler_obj = spider()
 RUNNING_CRAWLERS.append(crawler_obj)

# stop reactor when spider closes
crawler.signals.connect(spider_closing, signal=signals.spider_closed)
crawler.configure()
crawler.crawl(crawler_obj)
crawler.start()
</code></pre>

<h1>blocks process so always keep as the last statement</h1>

<p>reactor.run()</p>