473,387 Members | 1,575 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,387 software developers and data experts.

Re: Problems with curses

On Sat, 12 Jul 2008 20:49:56 -0400, Clay Hobbs wrote:
>
Unfortunately, the error message isn't very helpful.

But it would be helpful to tell it. If you get exceptions, always
copy'n'paste the traceback here. People might know what the exception
means and share their wisdom.
Here is the error message:

Traceback (most recent call last):
File "./text_adventure.py", line 25, in <module>
curses.wrapper(main)
File "/usr/lib/python2.5/curses/wrapper.py", line 44, in wrapper
return func(stdscr, *args, **kwds)
File "./text_adventure.py", line 19, in main
stdscr.scroll(3)
_curses.error: scroll() returned ERR
-- Ratfink

Jul 13 '08 #1
1 1472
On Jul 13, 6:22*pm, Clay Hobbs <c...@lakeserv.netwrote:
On Sat, 12 Jul 2008 20:49:56 -0400, Clay Hobbs wrote:
* * * Unfortunately, the error message isn't very helpful.
But it would be helpful to tell it. *If you get exceptions, always
copy'n'paste the traceback here. *People might know what the exception
means and share their wisdom.

Here is the error message:

Traceback (most recent call last):
* File "./text_adventure.py", line 25, in <module>
* * curses.wrapper(main)
* File "/usr/lib/python2.5/curses/wrapper.py", line 44, in wrapper
* * return func(stdscr, *args, **kwds)
* File "./text_adventure.py", line 19, in main
* * stdscr.scroll(3)
_curses.error: scroll() returned ERR

-- Ratfink
You need to put a stdscr.scrollok(True) in the beginning. That should
avoid the exception.
-Siddhant
Jul 20 '08 #2

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

Similar topics

1
by: Edmond Ho | last post by:
Hi, I'm having trouble with a small curses program. I'm associate a pad with a panel. As I understand, a pad is supposed to be just a window with an arbitrary size. That seems to imply that a pad...
1
by: Riccardo Galli | last post by:
Hi, I'm writing some widgets in curses. Actually I'm trying to write a combobox. To do so, I need to create a pad inside a panel, so that I can hide/show it. I can't do it. I can create a...
0
by: Matthew Alton | last post by:
The appended program freaks python 2.2 & 2.3 completely out. To reproduce the wierdness: i) copy the source to a file called consarn.py ii) $ python consarn.py; iii) the program is now doing a...
0
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',...
1
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 # #...
3
by: Simon Morgan | last post by:
Hi, I'm having trouble with the following code. The problem is that the value read by getch() when I hit the up or down keys doesn't match curses.KEY_UP or curses.KEY_DOWN respectively. Other...
7
by: Gasten | last post by:
Hello. The last weeks I've been coding a roguelike (you know, like nethack) in python using the nCurses library. Some week ago I ran into a problem: When I made the object for messagebar-output, I...
0
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:...
5
by: 7stud | last post by:
I can't see to get any y, x coordinates to work with curses. Here is an example: import curses def my_program(screen): while True: ch = screen.getch() if ch == ord("q"): break
1
by: Clay Hobbs | last post by:
I am making a text-based game similar to Zork with Python. I have decided to use the curses module, and have run into a problem. I want to scroll the commands and output up after a command is run...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...

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.