Skip to content

Commit

Permalink
Reinstated "help"
Browse files Browse the repository at this point in the history
  • Loading branch information
markdjwilliams committed Dec 4, 2007
1 parent b321806 commit f3b53c5
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion scripts/do
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Examples :

import os
import sys
import StringIO

import IECore

Expand Down Expand Up @@ -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" :
Expand Down

0 comments on commit f3b53c5

Please sign in to comment.