assert versionno == version.versionstr, "Revision of main program (%s) does not match that of library (%s). Please double-check your PYTHONPATH and installation locations." % (versionno, version.versionstr)
options = {}
if '--help' in sys.argv[1:]:
- sys.stdout.write(version.cmdhelp + "\n")
+ sys.stdout.write(version.getcmdhelp() + "\n")
sys.exit(0)
for optlist in getopt(sys.argv[1:], 'P:1oa:c:d:l:u:h')[0]:
options[optlist[0]] = optlist[1]
if options.has_key('-h'):
- sys.stdout.write(version.cmdhelp)
+ sys.stdout.write(version.getcmdhelp())
sys.stdout.write("\n")
sys.exit(0)
configfilename = os.path.expanduser("~/.offlineimaprc")
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA"""
-cmdhelp = """
+def getcmdhelp():
+ from offlineimap.ui import detector
+ import os
+ uilist = ""
+ for ui in detector.DEFAULT_UI_LIST:
+ uilist += " " + ui + os.linesep
+ return """
offlineimap [ -1 ] [ -P profiledir ] [ -a accountlist ] [
-c configfile ] [ -d debugtype[,debugtype...] ] [ -o ] [
-u interface ]
states that it cannot be. Use this option with
care. The pre-defined options, described in the
USER INTERFACES section of the man page, are:
-"""
-from offlineimap.ui import detector
-import os
-for ui in detector.DEFAULT_UI_LIST:
- cmdhelp += " " + ui + os.linesep
+""" + uilist