Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Assembler Tools

    GoDo 0.0.10

    Download button

    No screenshots available
    Downloads: 365  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Paul J. Davis | More programs
    MIT/X Consortium Lic... / FREE
    June 20th, 2010, 03:49 GMT
    ROOT / Programming / Assembler Tools

     Read user reviews (0)  Refer to a friend  Subscribe

    GoDo description

    Run some Python code in order

    GoDo executes a directory of Python code following the definition order.

    Given a directory structure that looks like such:

    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:

    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 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.


    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    definition order | Python code | Python | code | order

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM