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

(n)curses or tcl/tk?

Hi All,

Just learning Python - my first new language for about 18 years (I'm
not a programmer ...). I'm writing a small utility to manipulate some
text files (for the game VGA Planets, if you're interested: http://
www.phost.de). It's currently working, but it looks a bit ugly with
raw_input and just basic text output.

I have plans to expand the functions of the utility, and I want a
simple GUI frontend. I assumed I'd end up with something that looks a
bit like the Debian installer: a curses-driven thing with simple ascii
boxes and buttons. But reading a bit more about Python makes me think
that support for tcl/tk is much more developed than support for
curses.

So my question is, should I go to the trouble of learning how to make
boxes and stuff using tcl/tk, or just go with ncurses as I imagined?

Which is more portable? The basic idea is that this just runs on the
largest possible variety of systems (er, assuming they have Python
installed, of course). I use Debian mostly, but of course it needs to
run on bog-standard Windows boxes. Does that tilt the balance in
favour of curses or tcl/tk? Or should I just stick with ugly text?

Thanks for all your help,

CC (noob)

Feb 7 '07 #1
2 2090
On Feb 7, 5:35 pm, "magnate" <chr...@dbass.demon.co.ukwrote:
So my question is, should I go to the trouble of learning how to make
boxes and stuff using tcl/tk, or just go with ncurses as I imagined?
If you want to use curses on windows with python you need to install
WCurses first.
Other then that it is very portable.

After you get used to it curses is also quite easy to use, however tk
has a more features.

Depends on what you want to do. I would have used curses in your
position because it is easy to use (although tk is no rocket science
either) and I like apps that can run on a terminal emulator.

Ido.

Feb 7 '07 #2
As far as I know Windows does not support ncurses natively (using CygWin
probably changes that). So go with Tkinter. Looks crappy but at least it
should run on all major platforms...
Hi All,

Just learning Python - my first new language for about 18 years (I'm
not a programmer ...). I'm writing a small utility to manipulate some
text files (for the game VGA Planets, if you're interested: http://
www.phost.de). It's currently working, but it looks a bit ugly with
raw_input and just basic text output.

I have plans to expand the functions of the utility, and I want a
simple GUI frontend. I assumed I'd end up with something that looks a
bit like the Debian installer: a curses-driven thing with simple ascii
boxes and buttons. But reading a bit more about Python makes me think
that support for tcl/tk is much more developed than support for
curses.

So my question is, should I go to the trouble of learning how to make
boxes and stuff using tcl/tk, or just go with ncurses as I imagined?

Which is more portable? The basic idea is that this just runs on the
largest possible variety of systems (er, assuming they have Python
installed, of course). I use Debian mostly, but of course it needs to
run on bog-standard Windows boxes. Does that tilt the balance in
favour of curses or tcl/tk? Or should I just stick with ugly text?

Thanks for all your help,

CC (noob)

Feb 7 '07 #3

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

Similar topics

0
by: J Turner | last post by:
Hello, I'm playing with a python-based shell, which uses (guess what?) python as it's scripting language, for iterative invocation, environment variables, etc. Everything was going well,...
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
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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.