提交 b296d416 编写于 作者: P Pablo Hoffman

minor doc update for making it more windows-friendly

上级 80b96fc1
......@@ -152,7 +152,7 @@ extracted item into a file using `pickle`_::
class StoreItemPipeline(object):
def process_item(self, domain, response, item):
torrent_id = item.url.split('/')[-1]
f = open("/tmp/torrent-%s" % torrent_id, "w")
f = open("torrent-%s.pickle" % torrent_id, "w")
pickle.dump(item, f)
f.close()
......
......@@ -48,17 +48,22 @@ You can also override one (or more) settings from command line using the
Example::
scrapy-ctl.py crawl domain.com --set=LOG_FILE:/tmp/scrapy.log
scrapy-ctl.py crawl domain.com --set LOG_FILE=scrapy.log
2. Environment variables
------------------------
You can populate settings using environment variables prefixed with
``SCRAPY_``. For example, to change the log file location::
``SCRAPY_``. For example, to change the log file location un Unix systems::
$ export SCRAPY_LOG_FILE=/tmp/scrapy.log
$ export SCRAPY_LOG_FILE=scrapy.log
$ scrapy-ctl.py crawl example.com
In Windows systems, you can change the environment variables from the Control
Panel following `these guidelines`_.
.. _these guidelines: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sysdm_advancd_environmnt_addchange_variable.mspx
3. scrapy_settings
------------------
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册