LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-08-2013, 08:57 AM   #1
HalfMadDad
Member
 
Registered: Jun 2010
Location: Canada
Distribution: Slackware, systemd-garbage
Posts: 143

Rep: Reputation: 9
simple cursor-addressable command?


Hi Everyone

I always wondered how Lynx and VI could take input the way they do. Now I know it's because they are using the cursor-addressable feature of the terminal they are runnning it, or in other words they are moving the cursor to different places on the screen.

These projects have large code bases though. Is there an example of a command that uses this but is small? I just want to study how it works.

Thanks for reading-Patrick
 
Old 02-08-2013, 10:43 AM   #2
Nutria
Member
 
Registered: Nov 2007
Location: New Orleans, LA, USA
Distribution: Xubuntu
Posts: 67

Rep: Reputation: 6
Quote:
Originally Posted by HalfMadDad View Post
Hi Everyone

I always wondered how Lynx and VI could take input the way they do. Now I know it's because they are using the cursor-addressable feature of the terminal they are runnning it, or in other words they are moving the cursor to different places on the screen.

These projects have large code bases though. Is there an example of a command that uses this but is small? I just want to study how it works.
curses is the system of terminal independent cursor control. libncurses5 (new curses v5) is what Linux has used since the beginning.

Python has a nice wrapper around libncurses5 and good example code.
 
1 members found this post helpful.
Old 02-08-2013, 10:57 AM   #3
HalfMadDad
Member
 
Registered: Jun 2010
Location: Canada
Distribution: Slackware, systemd-garbage
Posts: 143

Original Poster
Rep: Reputation: 9
Thanks Nutria ! I marked this solved and clicked your rep.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Max addressable memory for 64bit JVM Process snoop234 Linux - Newbie 5 02-06-2012 10:34 AM
[SOLVED] Difference between addressable memory and maximum ram??? Nitesh Agarwal Programming 1 10-05-2011 03:57 AM
Maximum addressable RAM in distros? henryh3 Linux - Newbie 8 12-01-2008 05:36 PM
simple questions looking for a simple command s3ns4i Linux - Newbie 4 10-21-2008 12:55 PM
command-line mplayer: cursor goes AWOL stabu Linux - Software 1 01-07-2006 08:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration