Hi, thankyou for your time.
regards Steven ________________________________________ From: Mark Sapiro [m...@msapiro.net] Sent: Wednesday, 8 June 2011 2:53 p.m. To: Steven Jones Cc: mailman-users@python.org Subject: Re: [Mailman-Users] mailman NameError: global name '_' is not defined On 6/7/2011 6:35 PM, Steven Jones wrote: > hi, > > Oops sorry think i copied the wrong one! OK. See comments inline. [...] > import sys > import getpass > import getopt > > import paths > from Mailman import Utils > from Mailman.i18n import C_ It appears that Red Hat has implemented a Mailman.i18n.C_ function that is not in standard GNU Mailman and are using it here instead of the standard Mailman.i18n._ function. I can guess that C_ is intended to be 'command _', i.e. a replacement for the standard i18n._() to be used in command line programs, but that is only a guess, and I have no idea why they would do this. > PROGRAM = sys.argv[0] > ^L > def usage(code, msg=''): > if code: > fd = sys.stderr > else: > fd = sys.stdout > print >> fd, _(__doc__) However, in changing the references from _() to C_(), the line above was overlooked. You can fix your issue by changing the single line above from print >> fd, _(__doc__) to print >> fd, C_(__doc__) -- Mark Sapiro <m...@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org