Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install iw.recipe.fetcher

How to install iw.recipe.fetcher

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install iw.recipe.fetcher
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.2 Available View build log
Windows (64-bit)
0.2 Available View build log
Mac OS X (10.5+)
0.2 Available View build log
Linux (32-bit)
0.2 Available View build log
Linux (64-bit)
0.2 Available View build log
 
Author
License
GPL
Dependencies
Lastest release
version 0.2 on Jan 5th, 2011

What is iw.recipe.fetcher ?

Download an url to a local directory.

How to use iw.recipe.fetcher ?

The recipe download from an http server:

>>> server_data = tmpdir('server_data')
>>> write(server_data, 'file1.txt', 'test1')
>>> write(server_data, 'file2.txt', 'test1')
>>> write(server_data, 'file3.txt', 'test1')
>>> server_url = start_server(server_data)

We need some buildout vars:

>>> write('buildout.cfg', '''

System Message: ERROR/3 (<string>, line 27)

Inconsistent literal block quoting.

... [buildout] ... parts=test1 ... ... [test1] ... recipe=iw.recipe.fetcher ... urls= ... %(server_url)s/file1.txt ... base_url=%(server_url)s ... files= ... file2.txt ... file3.txt ... ''' % dict(server_url=server_url))

Now we can fetch some urls:

>>> print system(buildout)

System Message: ERROR/3 (<string>, line 44)

Inconsistent literal block quoting.

Installing test1. <BLANKLINE>

It works:

>>> ls(sample_buildout, 'test1')

System Message: ERROR/3 (<string>, line 52)

Inconsistent literal block quoting.
  • file1.txt
  • file2.txt
  • file3.txt
>>> write('buildout.cfg', '''
... [buildout]
... parts=test2
...
... [test2]
... recipe=iw.recipe.fetcher
... urls=
...   http://www.example.com/file1.txt
... find-links=%(server_url)s
... ''' % dict(server_url=server_url))

Now we can fetch some urls:

>>> print system(buildout)

System Message: ERROR/3 (<string>, line 72)

Inconsistent literal block quoting.

Uninstalling test1. Installing test2. <BLANKLINE>

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:3

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.