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 godo

How to install godo

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

Execute a directory of python code following the definition order.

Given a directory structure that looks like such:

System Message: WARNING/2 (<string>, line 8)

Literal block expected; none found.

myscripts/ 1-init.gd 2-run/ 1-stuff-a.gd 2-stuff-b.gd 3-finish.gd

GoDo will traverse through this directory running tasks defined in each file.

Tasks are defined as a function decorated with a @task decorator. Tasks defined in a file will be executed in the order in which they are defined.

Task Files

Any file ending in .gd will be read and evaluated as a Python source file. Any function that is decorated by a the @task decorator will be added to the list of tasks to execute.

Example mytasks.gd:

System Message: WARNING/2 (<string>, line 29)

Literal block expected; none found.

import os

@task def first_task(): print "Yay going and doing stuff!"

@task def second_task(cfg): print "A config option: %s" % cfg["whee"]

Tasks are executed from the same directory where the file that defines them is located.

Complete task file API:

  • @task - Decorate a function so that it will be executed.
  • cd(path) - Used in with statements to change the working directory.
  • run(cmd) - Run a shell command checking the return code.
  • sudo(cmd) - Prepends a command with sudo. Probably won't work if you

System Message: WARNING/2 (<string>, line 49)

Bullet list ends without a blank line; unexpected unindent.

don't use passwordless sudo. Obviously, that should be fixed.

Config Files

By default, GoDo will look in the base execution directory for a godo.cfg.py file. (The base execution directory is ./ unless specified on the command line). Alternatively you can specify a path. If a config file is found it is evaluated and passed as a dictionary to any task function that takes an argument.

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:6

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.