On Oct 15, 1:13 pm, Jan Sundström <sundstro...@gmail.com> wrote: > How do I get curses to work in Python 3.2 on win-64? > > I'm new to Python and when exploring Python in console I want to use > some > simple functions for console programming that don't emulate a > typewriter > terminal but rather a text screen terminal. I want to be able to clear > the screen, position the cursor > and do unbuffered reading from the keyboard. Also setting different > colors for the text and background. > > That could in Windows be accomplished by the handy WConio (http:// > newcenturycomputers.net/projects/wconio.html) > which contains just about everything that is needed for a console > application to become useful. > > However I want to accomplish it in Python 3.2 because I lack the > experience to build it myself. Now an alternative would > be to use some flavor of curses. Although having a plethora of > unnecessary functions it has the advantage of > existing for different platforms. > > I'm currently running Python 3.2.2 on win-64 > When Python is installed there is a Python32/Lib/curses library. As I > understand it this is only a some sort of > wrapper for a curses module to be downloaded and installed later?? > > So I downloaded and installed a curses module I that found and which > seemed appropriate: > > curses-2.2.win-amd64-py3.2.exe > > from > > http://www.lfd.uci.edu/~gohlke/pythonlibs/ > > It installed some stuff directly in Python32/lib/sitepackages. > > Now when I try in a program to do things like: > > import curses > stdscr = curses.initscr > > Python complains it can't find curses. However if I do > > import _curses > stdscr = _curses.initscr > > etc., everything works fine. I shouldn't have to write the underscores > though?? > How can I fix that? > Should I try to find some other version of curses? > > It seems I haven't yet grasped how to install a Python module? > > /John
`import curses` should work. What exactly is the error message? Does `import curses` work outside your program/program directory? The curses package is part of the standard library and usually installed in Python32\Lib\curses. On Windows the _curses.pyd files is missing in the standard distribution. curses-2.2.win-amd64-py3.2.exe installs the missing _curses.pyd file into Lib/site-packages. -- http://mail.python.org/mailman/listinfo/python-list