[maemo-developers] console curses application
From: Eugene Antimirov turist at gmail.comDate: Mon Jun 2 12:16:32 EEST 2008
- Previous message: console curses application
- Next message: console curses application
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> Hi,
> It's my first experience in development on maemo platform. I'm developing ca
> console application.
> I have downloaded virtual machine and have tried to run some sample applicatons.
> But all examples I have seen have GUI interface, so I have the several questions:
>
> 1. How can I run a console apptiocation on scratchbox?
> If i run sample GUI appplictions (./example1.py) I can found running
> aaplication on the Xephyr window.
> But if I run hello-world console application I don't see any effect.
So it just hangs up or prints some error?
> 2. Is there curses library on maemo platform? I have found the 'top' program
> on N810,
> so I suppose the answer is 'yes'. But when I try to include the header
> (#include <curses.h>)
> scratchbox cannot find this header. Where can I find a simple example of
> curses application?
>
> Something like this:
>
> #include <unistd.h>
> #include <stdlib.h>
> #include <curses.h>
>
> int main() {
> initscr();
> move(5, 15);
> printw(?%s?, ?Hello World?);
> refresh();
> sleep(2);
> endwin();
> exit(EXIT_SUCCESS);
> }
Scratchbox actually has curses.h, I guess you missed to add
"-lncurses" to your linker parameters line:
$ cc curses.c -o curses -lncurses
>
> 3. Can I create console application on python with curses library? I need
> somthing like:
>
> import curses
> # ....
>From http://pymaemo.garage.maemo.org/documentation/pymaemo_tutorial/python_maemo_howto.html
"Python limitations in maemo
...
The following modules are deprecated:
...curses...
I guess you should compile this module for you and provide as
additional third-party library. Or submit a request to pymaemo's
maintainers ;)
--
Sincerely,
Eugene
- Previous message: console curses application
- Next message: console curses application
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
