From f3b53c56d3f8e2a382b047ff35faa03e70383cfe Mon Sep 17 00:00:00 2001 From: Mark Williams Date: Tue, 4 Dec 2007 23:14:35 +0000 Subject: [PATCH] Reinstated "help" --- scripts/do | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/scripts/do b/scripts/do index ab0d8ad86e..cbe21387ce 100755 --- a/scripts/do +++ b/scripts/do @@ -75,6 +75,7 @@ Examples : import os import sys +import StringIO import IECore @@ -157,7 +158,22 @@ if sys.argv[1]=="-help" : if len( sys.argv ) > newIndex : exitWithUsage() - print loader.help( actionName, actionVersion ) + c = loader.load( actionName, actionVersion ) () + + textIO = StringIO.StringIO() + + formatter = IECore.WrappedTextFormatter( textIO ) + formatter.paragraph( "Name : " + c.name + "\n" ) + formatter.paragraph( c.description + "\n" ) + if len( c.parameters().values() ): + formatter.heading( "Parameters" ) + formatter.indent() + for p in c.parameters().values() : + IECore.formatParameterHelp( p, formatter ) + formatter.unindent() + formatter.paragraph( "Path : " + c.path + " Version : " + str( c.version ) ) + + print textIO.getvalue() sys.exit( 0 ) elif sys.argv[1]=="-listActions" :