Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

iw.recipe.cmd package

This recipe is used to run one or more command lines

We need some buildout vars:

>>> import os
>>> join = os.path.join
>>> data_dir = join(test_dir, 'data')
>>> parts_dir = join(data_dir, 'parts')
>>> buildout = {'instance': {'location': test_dir},
...             'buildout': {'directory': test_dir,
...             'parts-directory': test_dir}}
>>> name = 'cmds'

Ok, so now we can touch a file in data_dir:

>>> test_file = join(data_dir, 'test.txt')

>>> options = {'cmds': 'touch %s' % test_file}

>>> from iw.recipe.cmd import Recipe
>>> recipe = Recipe(buildout, name, options)
>>> path = recipe.install()
>>> 'test.txt' in os.listdir(data_dir)
True

And remove it:

>>> options = {'cmds': 'rm -f %s' % test_file}
>>> recipe = Recipe(buildout, name, options)
>>> path = recipe.install()
>>> 'test.txt' in os.listdir(data_dir)
False

We can run more than one commands:

>>> cmds = '''
... touch %s
... rm -f %s
... ''' % (test_file, test_file)

>>> recipe = Recipe(buildout, name, options)
>>> path = recipe.install()
>>> 'test.txt' in os.listdir(data_dir)
False

Release files for iw.recipe.cmd 0.1dev-r6515

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for iw.recipe.cmd 0.1dev-r6515
File Interpreter ABI Platform
iw.recipe.cmd-0.1dev_r6515-py2.4.egg Legacy Egg format - - Details

Release files / iw.recipe.cmd-0.1dev_r6515-py2.4.egg

Download URL iw.recipe.cmd-0.1dev_r6515-py2.4.egg
Size 8.2 kB
Tags Egg
SHA-256 checksum
How to use checksums
4a69875e2f06beb30ef25b0dd88a165f93b91f36a0719186d0dddba9a8e1eb7d
BLAKE2b-256 checksum
How to use checksums
ce24f80ab052be8f0114c2b5316d8a5b623dd774dd582aafdb88507c2d74159b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page