By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,370 Members | 1,534 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,370 IT Pros & Developers. It's quick & easy.

ncurses programming

P: n/a
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
Share this Question
Share on Google+
9 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
thank you very much for your suggestions and links, also slang got my
attention.
thanks.
Sep 27 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.