473,769 Members | 1,637 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5697
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.com wrote:
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.com wrote:
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.com wrote:
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_se t(1)
curses.setsyx( 2,3)
curses.doupdat e()

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.com wrote:
linkmaster032.. .@gmail.com wrote:
On Sep 19, 6:42*pm, linkmaster032.. .@gmail.com wrote:
On Sep 19, 1:24*am, Tim Roberts <t...@probo.com wrote:
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.com wrote:
linkmaster032.. .@gmail.com wrote:
>On Sep 19, 6:42*pm, linkmaster032.. .@gmail.com wrote:
>On Sep 19, 1:24*am, Tim Roberts <t...@probo.com wrote:
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_se t(1)
>curses.setsyx( 2,3)
>curses.doupdat e()
>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.com wrote:
linkmaster032.. .@gmail.com wrote:
On Sep 19, 6:42*pm, linkmaster032.. .@gmail.com wrote:
On Sep 19, 1:24*am, Tim Roberts <t...@probo.com wrote:
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_se t(1)
curses.setsyx( 2,3)
curses.doupdat e()
>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.com wrote:
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.com wrote:
linkmaster032.. .@gmail.com wrote:
>On Sep 19, 6:42*pm, linkmaster032.. .@gmail.com wrote:
>On Sep 19, 1:24*am, Tim Roberts <t...@probo.com wrote:
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_se t(1)
>curses.setsyx( 2,3)
>curses.doupdat e()
>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
4373
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 can be treated like a normal window when working with panels. I have this code: #!/usr/bin/env python import curses import curses.panel
1
3295
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 normal pad, but if I try to create it using "subpad" from a window I get _curses_panel.error: curses function returned NULL
0
1773
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 getch(); iv) hit a key; v) the program locks up, the interptreter is now munching on the CPU; vi) kill the interpreter from another shell; vii) scratch head and wonder why neither of the mutually exclusive clauses in the _io() member function...
0
1876
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
4126
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 'Schwerdy' Schwerdhöfer
1
3696
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>
3
4869
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 keys, such as 'z' in my example code, work fine. I only seem to have this problem when dealing with newly created windows and not with the standard/default/root one created by curses.wrapper() and passed to main().
7
2854
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 found a bug that I can't figure out (believe me; I've tried everything and asked for help several times on the IRC-channel). The updateMsg() and iMsg() takes a list of message-lines as argument (or process a string to a list), and it'll output...
5
6330
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
9589
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
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10045
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
9994
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,...
0
9863
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8870
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3958
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

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.