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

curses.setsyx()?

I tried curses.setsyx(2,3) in my script and it doesn't move the curses
cursor. Any alternatives/solutions?
Sep 18 '08 #1
8 5676
li**************@gmail.com wrote:
>
I tried curses.setsyx(2,3) in my script and it doesn't move the curses
cursor. Any alternatives/solutions?
Did you call doupdate after? setsyx just manipulates the data structures.
It takes a call to doupdate to force those changes to take effect visually.
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Sep 19 '08 #2
On Sep 19, 1:24*am, Tim Roberts <t...@probo.comwrote:
linkmaster032...@gmail.com wrote:
I tried curses.setsyx(2,3) in my script and it doesn't move the curses
cursor. Any alternatives/solutions?

Did you call doupdate after? *setsyx just manipulates the data structures.
It takes a call to doupdate to force those changes to take effect visually.
--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.
I added it and it still doesn't work. This is what I'm doing when I
want to display the cursor and prepare it for input at 2,3:

curses.echo()
curses.curs_set(1)
curses.setsyx(2,3)
curses.doupdate()
Sep 19 '08 #3
On Sep 19, 6:42*pm, linkmaster032...@gmail.com wrote:
On Sep 19, 1:24*am, Tim Roberts <t...@probo.comwrote:
linkmaster032...@gmail.com wrote:
>I tried curses.setsyx(2,3) in my script and it doesn't move the curses
>cursor. Any alternatives/solutions?
Did you call doupdate after? *setsyx just manipulates the data structures.
It takes a call to doupdate to force those changes to take effect visually.
--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

I added it and it still doesn't work. This is what I'm doing when I
want to display the cursor and prepare it for input at 2,3:

curses.echo()
curses.curs_set(1)
curses.setsyx(2,3)
curses.doupdate()
Any idea what's wrong?
Sep 21 '08 #4
li**************@gmail.com wrote:
>On Sep 19, 6:42*pm, linkmaster032...@gmail.com wrote:
>On Sep 19, 1:24*am, Tim Roberts <t...@probo.comwrote:
linkmaster032...@gmail.com wrote:
>I tried curses.setsyx(2,3) in my script and it doesn't move the curses
cursor. Any alternatives/solutions?
Did you call doupdate after? *setsyx just manipulates the data structures.
It takes a call to doupdate to force those changes to take effect visually.
--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

I added it and it still doesn't work. This is what I'm doing when I
want to display the cursor and prepare it for input at 2,3:

curses.echo()
curses.curs_set(1)
curses.setsyx(2,3)
curses.doupdate()

Any idea what's wrong?
No. Are you able to post an entire sample that demonstrates the problem?
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Sep 23 '08 #5
On Sep 22, 11:24*pm, Tim Roberts <t...@probo.comwrote:
linkmaster032...@gmail.com wrote:
On Sep 19, 6:42*pm, linkmaster032...@gmail.com wrote:
On Sep 19, 1:24*am, Tim Roberts <t...@probo.comwrote:
linkmaster032...@gmail.com wrote:
>I tried curses.setsyx(2,3) in my script and it doesn't move the curses
>cursor. Any alternatives/solutions?
Did you call doupdate after? *setsyx just manipulates the data structures.
It takes a call to doupdate to force those changes to take effect visually.
--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.
I added it and it still doesn't work. This is what I'm doing when I
want to display the cursor and prepare it for input at 2,3:
curses.echo()
curses.curs_set(1)
curses.setsyx(2,3)
curses.doupdate()
Any idea what's wrong?

No. *Are you able to post an entire sample that demonstrates the problem?
--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.
http://pastebin.com/m6413db1

Run that and press 'n' key. It is supposed to move the cursor to 2,3
and it doesn't.
Sep 23 '08 #6
On Sep 23, 4:16*pm, brad.at.sch...@gmail.com wrote:
On Sep 22, 11:24*pm, Tim Roberts <t...@probo.comwrote:
linkmaster032...@gmail.com wrote:
>On Sep 19, 6:42*pm, linkmaster032...@gmail.com wrote:
>On Sep 19, 1:24*am, Tim Roberts <t...@probo.comwrote:
linkmaster032...@gmail.com wrote:
>I tried curses.setsyx(2,3) in my script and it doesn't move the curses
>cursor. Any alternatives/solutions?
Did you call doupdate after? *setsyx just manipulates the data structures.
It takes a call to doupdate to force those changes to take effect visually.
--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.
>I added it and it still doesn't work. This is what I'm doing when I
>want to display the cursor and prepare it for input at 2,3:
>curses.echo()
>curses.curs_set(1)
>curses.setsyx(2,3)
>curses.doupdate()
>Any idea what's wrong?
No. *Are you able to post an entire sample that demonstrates the problem?
--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

http://pastebin.com/m6413db1

Run that and press 'n' key. It is supposed to move the cursor to 2,3
and it doesn't.
Sorry that was me, forgot to switch emails. But yes that is it. Remove
the line about ppm/settings.conf if you don't want to create it
because it will throw an exception.
Sep 23 '08 #7
li**************@gmail.com wrote:
>On Sep 23, 4:16*pm, brad.at.sch...@gmail.com wrote:
>On Sep 22, 11:24*pm, Tim Roberts <t...@probo.comwrote:
linkmaster032...@gmail.com wrote:
On Sep 19, 6:42*pm, linkmaster032...@gmail.com wrote:
On Sep 19, 1:24*am, Tim Roberts <t...@probo.comwrote:
linkmaster032...@gmail.com wrote:
>I tried curses.setsyx(2,3) in my script and it doesn't move the curses
cursor. Any alternatives/solutions?
...
>I added it and it still doesn't work. This is what I'm doing when I
want to display the cursor and prepare it for input at 2,3:
>curses.echo()
curses.curs_set(1)
curses.setsyx(2,3)
curses.doupdate()
>Any idea what's wrong?

http://pastebin.com/m6413db1

Run that and press 'n' key. It is supposed to move the cursor to 2,3
and it doesn't.
Of course it does. It moves the cursor, then does an update, then
immediately calls draw.game, which redraws the screen and moves the cursor.
If you want curses.setsyx (or the equivalent and more mnemonic scr.move) to
leave the cursor somewhere, you can't draw more text afterward.
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Sep 25 '08 #8
On Sep 25, 2:39*am, Tim Roberts <t...@probo.comwrote:
linkmaster032...@gmail.com wrote:
On Sep 23, 4:16*pm, brad.at.sch...@gmail.com wrote:
On Sep 22, 11:24*pm, Tim Roberts <t...@probo.comwrote:
linkmaster032...@gmail.com wrote:
>On Sep 19, 6:42*pm, linkmaster032...@gmail.com wrote:
>On Sep 19, 1:24*am, Tim Roberts <t...@probo.comwrote:
linkmaster032...@gmail.com wrote:
>I tried curses.setsyx(2,3) in my script and it doesn't move the curses
>cursor. Any alternatives/solutions?
...
>I added it and it still doesn't work. This is what I'm doing whenI
>want to display the cursor and prepare it for input at 2,3:
>curses.echo()
>curses.curs_set(1)
>curses.setsyx(2,3)
>curses.doupdate()
>Any idea what's wrong?
>http://pastebin.com/m6413db1
Run that and press 'n' key. It is supposed to move the cursor to 2,3
and it doesn't.

Of course it does. *It moves the cursor, then does an update, then
immediately calls draw.game, which redraws the screen and moves the cursor.
If you want curses.setsyx (or the equivalent and more mnemonic scr.move) to
leave the cursor somewhere, you can't draw more text afterward.
--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.
OH!!!! Thank you!!!
Sep 25 '08 #9

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',...
4
by: schwerdy | last post by:
Hi together, can someone provide an example of a curses application that works in a xterm that can be resized? I could not find any working example yet... Thanks in advance, Sebastian...
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...
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
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.