473,783 Members | 2,269 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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?
Jul 18 '05 #1
2 3957
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
Jul 18 '05 #2
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

Jul 18 '05 #3

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

Similar topics

1
1535
by: copx | last post by:
Hi, I want to write a console/terminal app in Python that requires curses-like functionality. Problem: the python curses module doesn't seem to work on Windows. In fact it doesn't work (isn't part of the Python package) on my Linux distro (SUSE Linux 9.1 Special Edition) either. Well what should I do? The app is supposed to work on Windows and Linux at least (more platforms would be nice). TIA, copx
0
1877
by: Matt Garman | last post by:
I'd like to write a class or module in python that allows me to do on-the-fly color changing in the curses module. I'm thinking about something along the lines of this: addstr(y, x, 'hello', brightyellow, blue) The module would automatically interpret the above as curses.init_pair(i, curses.COLOR_YELLOW, curses.COLOR_BLUE)
4
6021
by: Peter | last post by:
Last November I posted a message asking for advice on using simple screen handling techniques under Windows. Since then I have been occupied with family / job /Christmas /living and trying to understand curses under linux (it works, seems very complex, sure I'm missing something ...). Only now am I returning to my original query. One reply (in fact the only reply - thanks Tim Golden) suggested I look at...
0
2405
by: Brano Zarnovican | last post by:
Hi ! I'd like to init curses and still have working Python interactive command line. I found that you can replace stdin/stdout/stderr like this: #!/usr/bin/python -i import curses import sys
1
3697
by: Jerry Fleming | last post by:
Hi, I have wrote a game with python curses. The problem is that I want to confirm before quitting, while my implementation doesn't seem to work. Anyone can help me? #!/usr/bin/python # # Brick & Ball in Python # by Jerry Fleming <jerryfleming@etang.com>
2
2464
by: krishnakant Mane | last post by:
hello, I am a new member to this list. I am Krishnakant from India, Mumbai. I have been coding in python for quite some time and now I am at the intermediate level of programming as far as python is concerned. I am going to develop a accounting software that can work on the console and accessed through ssh from other terminals. I will like to use the curses or ncurses library for the menus and the input forms with add, save, delete,...
0
1270
by: skip | last post by:
Environment: Solaris 10, Python 2.4.2. I'm trying to convert a very simple (display-wise) program to use curses. This is my first try at using curses. I have wrapped my main: try: sys.exit(curses.wrapper(main, *sys.argv)) except (KeyboardInterrupt, SystemExit): sys.exit(0)
15
4817
by: pinkfloydhomer | last post by:
I need to develop a cross-platform text-mode application. I would like to do it in Python and I would like to use a mature text-mode library for the UI stuff. The obvious choice, I thought, was ncurses. But as far as I can tell, it is not available for Python on Windows? Is there a workaround? Or are there alternative libraries that might be used instead of (n)curses? I know I can use (n)curses on *nix and console on Windows etc., but...
5
2765
by: Ghirai | last post by:
Hello list, I need to write a console application. Are there any wrappers around curses/ncurses? Or any other similar libraries? Thanks. -- Regards,
0
9643
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10313
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10081
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4044
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3643
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2875
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.