curses is not imported under Linux (and Python 2.4)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Konrad Koller

    #1

    curses is not imported under Linux (and Python 2.4)

    import curses
    produces the ImportError: No module named _curses
    ("from _curses import *" in line 15 in __init__.py)
    Of course imp.find_module ("_curses") reports the same error.
    How can I make use of the curses package for writing a Python script
    with curses?
  • Steve Holden

    #2
    Re: curses is not imported under Linux (and Python 2.4)

    Konrad Koller wrote:
    [color=blue]
    > import curses
    > produces the ImportError: No module named _curses
    > ("from _curses import *" in line 15 in __init__.py)
    > Of course imp.find_module ("_curses") reports the same error.
    > How can I make use of the curses package for writing a Python script
    > with curses?[/color]

    I get the same thing under Windows: _curses is the compiled extension
    supporting the curses library, so I must presume that isn't supported by
    default on Windows.

    No problems under Cygwin or on Linux.

    Googling for "python curses windows" might provide a few pointers.

    regards
    Steve
    --
    Steve Holden http://www.holdenweb.com/
    Python Web Programming http://pydish.holdenweb.com/
    Holden Web LLC +1 703 861 4237 +1 800 494 3119

    Comment

    • Craig Ringer

      #3
      Re: curses is not imported under Linux (and Python 2.4)

      On Fri, 2005-01-07 at 00:38, Konrad Koller wrote:[color=blue]
      > import curses
      > produces the ImportError: No module named _curses
      > ("from _curses import *" in line 15 in __init__.py)
      > Of course imp.find_module ("_curses") reports the same error.
      > How can I make use of the curses package for writing a Python script
      > with curses?[/color]

      What Linux distro?
      Is the Python version you're running one you compiled, one that shipped
      with the distro, or a 3rd party RPM?

      At a guess, I'd say you compiled it yourself and you don't have the
      ncurses development packages (providing the ncurses header files and
      static libs) installed.

      --
      Craig Ringer

      Comment

      Working...