Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > curses is not imported under Linux (and Python 2.4)

Reply
Thread Tools

curses is not imported under Linux (and Python 2.4)

 
 
Konrad Koller
Guest
Posts: n/a
 
      01-06-2005
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?
 
Reply With Quote
 
 
 
 
Steve Holden
Guest
Posts: n/a
 
      01-06-2005
Konrad Koller wrote:

> 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?


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
 
Reply With Quote
 
 
 
 
Craig Ringer
Guest
Posts: n/a
 
      01-07-2005
On Fri, 2005-01-07 at 00:38, Konrad Koller wrote:
> 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?


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

 
Reply With Quote
 
Konrad Koller
Guest
Posts: n/a
 
      01-09-2005
Thanks for your hint.
>What Linux distro?

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

compiled with Python-2.4.tar.bz2
>
>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.

see above, but I did not exclude anything, it was a totally normal
run.
I did the same installation of Python2.4 on a different computer with
Fedora2 and found there the _curses.so and _curses_panel.so in
lib-dynload, which I missed in SuSE Linux, although under SuSE the
curses package was present in Lib. I don't understand this strange
behavior between the two installations.
After having the 2 mentioned static libs transfered from the "Fedora
computer" to the the "SuSE computer" the curses worked fine under
SuSE linux

Konrad Koller
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why do directly imported variables behave differently than thoseattached to imported module? Dun Peal Python 10 05-03-2011 10:11 PM
report on building of python 2.5.2 under msys under wine on linux. Luke Kenneth Casson Leighton Python 0 01-15-2009 09:48 PM
Re: Replacing curses (Was: Re: Problem with curses and UTF-8) Jean-Paul Calderone Python 2 02-09-2006 08:29 AM
help : my jar file is not running under linux terminal , but it runs under JbuilderX ide bronby Java 1 07-15-2005 07:23 AM
"Variable ... is not imported..." using an imported variable from a module Volker Nicolai Perl Misc 9 07-04-2005 08:34 AM



Advertisments