> Thanks for the help Tim. I just copied and pasted your code into a > file in my $PYTHONPATH (IndentedHelpFormatterWithNL.py), but I'm > getting the following error: > > class IndentedHelpFormatterWithNL(IndentedHelpFormatter): > NameError: name 'IndentedHelpFormatter' is not defined > > > I tried adding: from optparse imoport IndentedHelpFormatter into the > aforementioned file, but no luck again. What am I missing???
spelling "import" correctly? :) Also, make sure that, if you've named your module "IndentedHelpFormatterWithNL.py" that created your parser with parser = OptionParser(... formatter= IndentedHelpFormatterWithNL.IndentedHelpFormatterWithNL ) You'll also want to make sure that these two lines: from optparse import IndentedHelpFormatter import textwrap are at the top of the IndentedHelpFormatterWithNL.py file, not at the top of the file importing the IndentedHelpFormatter. -tkc -- http://mail.python.org/mailman/listinfo/python-list