473,396 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

cmd Library Module trouble

Hope someone can help ...

My Python sys.version prints out as follows:
'2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)]'

I'm also running Windows XP SP1 and I have installed PyGame 1.6,
wxWindows 2.5 and the latest Twisted dist. I only include these for
the sake of completeness.

I'm trying to write something using the 'cmd' module, but I get the
error below when I run the source included at the end of this post.
It's pretty basic. This looks like a readline error, but the Python
documentation states that the cmd module should be OS independent, and
I'm not trying to use any readline features. Any ideas??? Please help!

Juan

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "c:/DOCUME~1/CHROMO~1/LOCALS~1/Temp/python-3672MGt", line 15,
in ?
tn.cmdloop()
File "C:\Python23\lib\cmd.py", line 109, in cmdloop
self.preloop()
File "C:\Python23\lib\cmd.py", line 153, in preloop
self.old_completer = readline.get_completer()
AttributeError: 'module' object has no attribute 'get_completer

## Source

import os
import cmd

class TimeNote(cmd.Cmd):

def __init__(self):
cmd.Cmd.__init__(self)
self.prompt = ">> "
self.intro = "Welcome to TimeNote"
if __name__ == "__main__":
tn = TimeNote()
tn.cmdloop()
Jul 18 '05 #1
2 2057
Juan Stang wrote:
Hope someone can help ...

My Python sys.version prints out as follows:
'2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)]'

I'm also running Windows XP SP1 and I have installed PyGame 1.6,
wxWindows 2.5 and the latest Twisted dist. I only include these for
the sake of completeness.

I'm trying to write something using the 'cmd' module, but I get the
error below when I run the source included at the end of this post.
It's pretty basic. This looks like a readline error, but the Python
documentation states that the cmd module should be OS independent, and
I'm not trying to use any readline features. Any ideas??? Please help!


There's no native Windows readline with python. This means you have a
third-party readline module somewhere. There's a readline out there
(Chris ....? wrote it, can't remember the name) which is _very_ problematic: it
does NOT expose the full readline API, so modules which try to import it
succeed initially, only to later crash horribly because the thing is very
incomplete.

If you want readline support under windows, google('uncpythontools'), you'll
find Gary Bishop's _excellent_ library, which adds proper ANSI color hanlding
to the pathetic Windows terminal.

Best,

f
Jul 18 '05 #2
Thank you Fernando!

Solved the problem entirely. Appreciate it.
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Raymond Hettinger | last post by:
Comments are invited on the following proposed PEP. Raymond Hettinger ------------------------------------------------------- PEP: 329
2
by: Storm | last post by:
.... that I would like to use in a client/server application that would : 1) detect reliably when connection is lost and try automatically to reconnect to the server and the link is declared...
6
by: Eric DeWall | last post by:
In trying to clean up the inevitable debug printing littered through some code, I started reading up on the 'logging' module. Browsing groups indicates that the design of the module is...
8
by: Felix Wiemann | last post by:
Hi! I want to create a module myproject.ui.curses, which needs to import the curses library. However, if I just write ``import curses``, the module imports *itself* instead of the standard...
0
by: plb | last post by:
All: I am struggling with an import problem... In my package, myapp, there is a module called logging. This module, naturally, imports the standard library module logging. However, when I...
6
by: Jonathon Blake | last post by:
All: I thought I had seen a python library/module that easily enabled one to read / write / create MSAccess databases a couple of years ago. Now, I can't find it, or any reference to such a...
3
by: Gary James | last post by:
I'm making a C# library module that has methods & properties that I've commented. I would like these comments to appear in the object browser when the library is used by another .NET application....
2
by: Laurence Nuttall | last post by:
I have a .net solution that is a class library. I have a form in it called frmAbout I have a public sub, or I assume what will be a method to show the form. but when I type the frmabout name...
3
by: sniipe | last post by:
Hi, I am looking fo svn library(module) which is used in the svn- mailer(http://opensource.perlig.de/svnmailer/) project. Does anybody know where can I find it(download url)? This is information...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.