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

ncurses programming

hi, i want to use ncurses library in python i`ve found proper library
for that, PyNcurses.
then i searched for some documentation about ncurses programming, i only
found that web site ;
http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/
this howto is nice but seems to me, this is for experienced ncurses
programmers who have just migrated to python so i dont understand
anything from examples and howto. what should i do ? firstly should i
learn ncurses programmin on C then migrate to python?
thanks.
Sep 26 '05 #1
9 8247
ncf
I don't know too much about (n)curses, but I feel that it's worth
pointing out that Python has a (built-in?) module named `curses` that
supports ncurses as of Python version 1.6.

I don't think it'd be necessary to learn how to use ncurses in C first,
though. The Python docs for the curses module is pretty straight
forward, and they link to what I feel is a pretty good tutorial on the
module.

Py Docs: http://docs.python.org/lib/module-curses.html
Tutorial: http://www.python.org/doc/howto/curses/curses.html

Also, if you choose to take the Python module route, you might want to
consider using the curses.wrapper module to ensure that if any errors
happen, it will close out curses all of the way instead of allowing
curses to screw up your console window.

Wish I could be of more help. Any questions and I'll gladly look into
it to the best of my abilities.

-Wes

Sep 26 '05 #2
ncf
I don't know too much about (n)curses, but I feel that it's worth
pointing out that Python has a (built-in?) module named `curses` that
supports ncurses as of Python version 1.6.

I don't think it'd be necessary to learn how to use ncurses in C first,
though. The Python docs for the curses module is pretty straight
forward, and they link to what I feel is a pretty good tutorial on the
module.

Py Docs: http://docs.python.org/lib/module-curses.html
Tutorial: http://www.python.org/doc/howto/curses/curses.html

Also, if you choose to take the Python module route, you might want to
consider using the curses.wrapper module to ensure that if any errors
happen, it will close out curses all of the way instead of allowing
curses to screw up your console window.

Wish I could be of more help. Any questions and I'll gladly look into
it to the best of my abilities.

-Wes

Sep 26 '05 #3
Hallöchen!

"ncf" <no***************@gmail.com> writes:
[...]

Py Docs: http://docs.python.org/lib/module-curses.html


This document suggests that Python+ncurses won't work on windows.
What's the reason for this?

Tschö,
Torsten.

--
Torsten Bronger, aquisgrana, europa vetus ICQ 264-296-646
Sep 26 '05 #4
On 2005-09-26, Sinan Nalkaya <er*************@gmail.com> wrote:
hi, i want to use ncurses library in python i`ve found proper
library for that, PyNcurses. then i searched for some
documentation about ncurses programming, i only found that web
site ; http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/
this howto is nice but seems to me, this is for experienced
ncurses programmers who have just migrated to python so i dont
understand anything from examples and howto. what should i do
? firstly should i learn ncurses programmin on C then migrate
to python? thanks.


Here's an introductory page:

http://gnosis.cx/publish/programming..._python_6.html

If what you want to do is fairly simple. the "newt" libarary
might worth looking at. It's very light-weight, easy to use,
and has a bunch of built-in widget types (text entry boxes,
radio buttons, progress bars, message boxes, etc). It's main
restriction when compated to something like ncurses/forms is
that newt's windows are "stacked" and the user can only
interact with the top one.

Newt was originally developed by RedHat for their text-mode
installer and sysadmin tools that were written in Python.

The documents are a bit sparse and sometimes out-of-date, but
there are a few decent example programs in the source distro.

The Python newt library module is called "snack", so be careful
not to get get confused with the sound library of the same name.

It's available for most Linux distros and requires the "slang"
library.

If your distro doesn't have a pre-built newt library you can
get it from here:

http://www.python.org/pyvault/SRPMS/...-0.52.0-3.html

--
Grant Edwards grante Yow! Imagine--a WORLD
at without POODLES...
visi.com
Sep 26 '05 #5
Torsten Bronger <br*****@physik.rwth-aachen.de> writes:
Hallöchen!

"ncf" <no***************@gmail.com> writes:
[...]

Py Docs: http://docs.python.org/lib/module-curses.html


This document suggests that Python+ncurses won't work on windows.
What's the reason for this?


Could it be that ncurses doesn't work on Windows? At least, it didn't
last time I looked. There was a curses library for Windows, but
you'll have to google for it.

<mike
--
Mike Meyer <mw*@mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
Sep 26 '05 #6
On 2005-09-26, Mike Meyer <mw*@mired.org> wrote:
[...]
Py Docs: http://docs.python.org/lib/module-curses.html


This document suggests that Python+ncurses won't work on windows.
What's the reason for this?


Could it be that ncurses doesn't work on Windows? At least, it
didn't last time I looked. There was a curses library for
Windows, but you'll have to google for it.


I think there used to be something called pdcurses that
supposedly worked under windows. That was quite a while ago, I
never tried it, and I may be misremembering the name.

I've no idea if there was a pdcurses module for python.

--
Grant Edwards grante Yow! I will SHAVE and
at buy JELL-O and bring my
visi.com MARRIAGE MANUAL!!
Sep 26 '05 #7
On 2005-09-26, Grant Edwards <gr****@visi.com> wrote:
On 2005-09-26, Mike Meyer <mw*@mired.org> wrote:
[...]
Py Docs: http://docs.python.org/lib/module-curses.html

This document suggests that Python+ncurses won't work on windows.
What's the reason for this?
Could it be that ncurses doesn't work on Windows? At least, it
didn't last time I looked. There was a curses library for
Windows, but you'll have to google for it.


I think there used to be something called pdcurses that
supposedly worked under windows. That was quite a while ago, I
never tried it, and I may be misremembering the name.


http://pdcurses.sourceforge.net/
I've no idea if there was a pdcurses module for python.


Apparently there was at one time:

http://teyc.editthispage.com/filedownloads

A more recent reference:

http://mail.python.org/pipermail/pat...ne/017763.html

--
Grant Edwards grante Yow! I wish I was a
at sex-starved manicurist
visi.com found dead in the Bronx!!
Sep 26 '05 #8
Hallöchen!

Grant Edwards <gr****@visi.com> writes:
On 2005-09-26, Mike Meyer <mw*@mired.org> wrote:
[...]
Py Docs: http://docs.python.org/lib/module-curses.html

This document suggests that Python+ncurses won't work on windows.
What's the reason for this?


Could it be that ncurses doesn't work on Windows? At least, it
didn't last time I looked. There was a curses library for
Windows, but you'll have to google for it.


I think there used to be something called pdcurses that
supposedly worked under windows.


Wouldn't http://gnuwin32.sourceforge.net/packages/ncurses.htm be a
good starting point?

Tschö,
Torsten.

--
Torsten Bronger, aquisgrana, europa vetus ICQ 264-296-646
Sep 26 '05 #9
thank you very much for your suggestions and links, also slang got my
attention.
thanks.
Sep 27 '05 #10

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

Similar topics

2
by: Volker Kamp | last post by:
Hi, I'm using the CLI SAPI of PHP to create ncurses programs. All works fine instead of debugging, since most PHP debuggers are not compatible to CLI. The worst is, that after calling...
2
by: Nick R | last post by:
I know, my title really sucks. How do you draw an individual pixel with ncurses?
5
by: arve.knudsen | last post by:
Hi I'm trying to build a Python package that I can use on different Linux setups, for this purpose it would be nice to weld external dependencies (libraries) into Python itself. So far I've...
2
by: mark.e.nelson | last post by:
Hi, I am trying to pass a pointer to a struct to a function that uses the data in the struct, and also happens to use ncurses. I always get a segmentation violation when the program exits. I...
4
by: lnatz | last post by:
Hi, I am writing a shell and am using ncurses to recognize key commands like up_arrow(KEY_UP) and down_arrow(KEY_DOWN). In a unix/linux OS the up arrow would give you the last command you input. I...
6
by: dimitris.papastamos | last post by:
Hello everyone, I've been working on a simple editor myself and I seem to be having some problems with ncurses or so. I have been debugging this program quite a lot trying to detect where the bug...
2
by: =?ISO-8859-2?Q?Miros=B3aw?= Makowiecki | last post by:
Is it a library at C++ by means of library of ncurses at linux,that it implement library of ncurses but by means language of C++,it is by means of class,struct and other? if yes is it any?
3
by: sirix | last post by:
Hi, I'm using g++ 4.1.2 and ncurses 5.6. Following simple code correctly displays dimensions of an xterm while one resizes it's window. I thought that uncommenting wouldn't change anything in a...
1
by: ChuckB | last post by:
Ok, I'm trying to create a GTK+ application that scrolls Hs across the screen until you press q or Q. I've got it working in console wise using ncurses. What I'm trying to do now is make a full...
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
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...
0
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...

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.