Here is an example work-around for those who wish to use cmd.Cmd, or any other ncurses-linked Python module. Some modules conflict with WeeChat when loaded directly into the WeeChat python interpreter, including all of those that link to ncurses. What you need to do is to execute the conflicting modules within a *separate* python interpreter instance, while maintaining the interface between WeeChat and the script. A typical method to accomplish this: (1) all use of conflicting module(s) must run in stand-alone Python script(s) designated as SLAVE (2) a WeeChat script that facilitates IRC commands, etc., and does not use conflicting modules, is designated as MASTER (3) the MASTER script (1) executes and controls SLAVE script(s) (2) via some form of interprocess communication One clean way to accomplish this is from MASTER to parse the WeeChat IRC command, and send the direct results to the subprocess as a single line, token-parsable by SLAVE. User inputs '/cmd -g blah foo bar' in WeeChat. The MASTER writes to the SLAVE pipe 'CMD G blah foo bar', and then reads from the SLAVE pipe for how to proceed. An obvious method for the MASTER--SLAVE communication is a bidirectional pipe using some form of 'popen2' or Popen from the Python library. Unfortunately, there are a plethora of caveats involved, including the fact that synchronous pipe communication will likely lockup even with Python 2.4. To solve this, one can use asynchronous pipe communication. An example module for subclassing the Python 2.4 subprocess module: 'subproc2.py' http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440554 An example of a WeeChat script that uses this form of interprocess communication: https://tstotts.net/pubvc/weechat-plugins/diatheke4IRC/