portable text user interface

Discussion in 'Python' started by Maxim Kasimov, Dec 29, 2004.

  1. Hi.
    Are there widely used and recommended Python libraries that will
    let me makes a portable text user interface?

    --

    Best regards,
    Maxim
     
    Maxim Kasimov, Dec 29, 2004
    #1
    1. Advertising

  2. Maxim Kasimov

    Miki Tebeka Guest

    Hello Maxim,

    > Are there widely used and recommended Python libraries that will
    > let me makes a portable text user interface?

    If you just need a text-like interface you can use Tkinter.
    See (shameless plug) http://developer.berlios.de/projects/bcd/ and
    http://developer.berlios.de/dbimage.php?id=1112 for example.

    If you need something that runs through telnet/ssh ... than curses is what
    your looking for. There's a win32 port to it somewhere.

    Bye.
    --
    ------------------------------------------------------------------------
    Miki Tebeka <>
    http://tebeka.bizhat.com
    The only difference between children and adults is the price of the toys
     
    Miki Tebeka, Dec 29, 2004
    #2
    1. Advertising

  3. Maxim Kasimov

    Fuzzyman Guest

    Miki Tebeka wrote:
    > Hello Maxim,
    >
    > > Are there widely used and recommended Python libraries that will
    > > let me makes a portable text user interface?

    > If you just need a text-like interface you can use Tkinter.
    > See (shameless plug) http://developer.berlios.de/projects/bcd/ and
    > http://developer.berlios.de/dbimage.php?id=1112 for example.
    >


    Hello Miki,

    Your project looks very interesting. It would be better if it displayed
    an error message if it can't find the '_bcdrc' file. If you run it from
    windoze it just appears and disapears.

    How about allowing the '_bcdrc' file to be in the same directory as the
    script as well.

    Any chance of you releasing the Tkinter text interface as a separate
    library, with a less restrictive license ? It looks very good - but I
    can't use it in my projects if it is GPL.

    Regards,

    Fuzzy
    http://www.voidspace.org.uk/python/index.shtml

    > If you need something that runs through telnet/ssh ... than curses is

    what
    > your looking for. There's a win32 port to it somewhere.
    >
    > Bye.
    > --
    >

    ------------------------------------------------------------------------
    > Miki Tebeka <>
    > http://tebeka.bizhat.com
    > The only difference between children and adults is the price of the

    toys
     
    Fuzzyman, Dec 29, 2004
    #3
  4. Maxim Kasimov

    Miki Tebeka Guest

    Hello Fuzzyman,

    > > > Are there widely used and recommended Python libraries that will
    > > > let me makes a portable text user interface?

    > > If you just need a text-like interface you can use Tkinter.
    > > See (shameless plug) http://developer.berlios.de/projects/bcd/ and
    > > http://developer.berlios.de/dbimage.php?id=1112 for example.


    > Your project looks very interesting. It would be better if it displayed
    > an error message if it can't find the '_bcdrc' file. If you run it from
    > windoze it just appears and disapears.
    >
    > How about allowing the '_bcdrc' file to be in the same directory as the
    > script as well.

    Cool. A user!
    Thanks for the comments. I'll add searching next to the application on
    win32 platforms.

    > Any chance of you releasing the Tkinter text interface as a separate
    > library, with a less restrictive license ? It looks very good - but I
    > can't use it in my projects if it is GPL.

    It's just standard Tkinter Listbox with key bindings and it's under 160
    lines of code. Nothing special here.

    Bye.
    --
    ------------------------------------------------------------------------
    Miki Tebeka <>
    http://tebeka.bizhat.com
    The only difference between children and adults is the price of the toys
     
    Miki Tebeka, Dec 30, 2004
    #4
  5. Miki Tebeka wrote:
    > Hello Fuzzyman,
    >
    >
    >>>>Are there widely used and recommended Python libraries that will
    >>>>let me makes a portable text user interface?
    >>>
    >>>If you just need a text-like interface you can use Tkinter.
    >>>See (shameless plug) http://developer.berlios.de/projects/bcd/ and
    >>>http://developer.berlios.de/dbimage.php?id=1112 for example.

    >
    >
    >>Your project looks very interesting. It would be better if it displayed
    >>an error message if it can't find the '_bcdrc' file. If you run it from
    >>windoze it just appears and disapears.
    >>
    >>How about allowing the '_bcdrc' file to be in the same directory as the
    >>script as well.

    >
    > Cool. A user!
    > Thanks for the comments. I'll add searching next to the application on
    > win32 platforms.
    >
    >
    >>Any chance of you releasing the Tkinter text interface as a separate
    >>library, with a less restrictive license ? It looks very good - but I
    >>can't use it in my projects if it is GPL.

    >
    > It's just standard Tkinter Listbox with key bindings and it's under 160
    > lines of code. Nothing special here.
    >
    > Bye.
    > --
    > ------------------------------------------------------------------------
    > Miki Tebeka <>
    > http://tebeka.bizhat.com
    > The only difference between children and adults is the price of the toys


    i have not used Tcl/Tk before, and don't know how to solve the problem -

    after i've made config file (.bcdrc) and run the script on FreeBSD 4, i've got the message:

    Traceback (most recent call last):
    File "./bcd.py", line 177, in ?
    root = Tk() # Main window
    File "/usr/local/lib/python2.2/lib-tk/Tkinter.py", line 1511, in __init__
    self.tk = _tkinter.create(screenName, baseName, className)
    TclError: no display name and no $DISPLAY environment variable


    --
    Best regards,
    Maxim
     
    Maxim Kasimov, Dec 30, 2004
    #5
  6. Maxim Kasimov

    Steve Holden Guest

    Maxim Kasimov wrote:

    > Miki Tebeka wrote:
    >
    >> Hello Fuzzyman,
    >>
    >>
    >>>>> Are there widely used and recommended Python libraries that will
    >>>>> let me makes a portable text user interface?
    >>>>
    >>>>
    >>>> If you just need a text-like interface you can use Tkinter.
    >>>> See (shameless plug) http://developer.berlios.de/projects/bcd/ and
    >>>> http://developer.berlios.de/dbimage.php?id=1112 for example.

    >>
    >>
    >>
    >>> Your project looks very interesting. It would be better if it displayed
    >>> an error message if it can't find the '_bcdrc' file. If you run it from
    >>> windoze it just appears and disapears.
    >>>
    >>> How about allowing the '_bcdrc' file to be in the same directory as the
    >>> script as well.

    >>
    >>
    >> Cool. A user!
    >> Thanks for the comments. I'll add searching next to the application on
    >> win32 platforms.
    >>
    >>
    >>> Any chance of you releasing the Tkinter text interface as a separate
    >>> library, with a less restrictive license ? It looks very good - but I
    >>> can't use it in my projects if it is GPL.

    >>
    >>
    >> It's just standard Tkinter Listbox with key bindings and it's under 160
    >> lines of code. Nothing special here.
    >>
    >> Bye.
    >> --
    >> ------------------------------------------------------------------------
    >> Miki Tebeka <>
    >> http://tebeka.bizhat.com
    >> The only difference between children and adults is the price of the toys

    >
    >
    > i have not used Tcl/Tk before, and don't know how to solve the problem -
    >
    > after i've made config file (.bcdrc) and run the script on FreeBSD 4,
    > i've got the message:
    >
    > Traceback (most recent call last):
    > File "./bcd.py", line 177, in ?
    > root = Tk() # Main window
    > File "/usr/local/lib/python2.2/lib-tk/Tkinter.py", line 1511, in __init__
    > self.tk = _tkinter.create(screenName, baseName, className)
    > TclError: no display name and no $DISPLAY environment variable
    >
    >

    This is a problem with window creation. I presume it's occurring because
    you aren't running the program in a windowed environment - if you've
    logged in through a graphical screen such as xdm and you are running the
    program in a window on a desktop the DISPLAY environment variable is
    normally set up for you.

    Perhaps you are just telnetting in from a remote system?

    regards
    Steve
    --
    Steve Holden http://www.holdenweb.com/
    Python Web Programming http://pydish.holdenweb.com/
    Holden Web LLC +1 703 861 4237 +1 800 494 3119
     
    Steve Holden, Dec 30, 2004
    #6
  7. Steve Holden wrote:
    > Maxim Kasimov wrote:
    >
    >> Miki Tebeka wrote:
    >>
    >>> Hello Fuzzyman,
    >>>
    >>>
    >>>>>> Are there widely used and recommended Python libraries that will
    >>>>>> let me makes a portable text user interface?
    >>>>>
    >>>>>
    >>>>>
    >>>>> If you just need a text-like interface you can use Tkinter.
    >>>>> See (shameless plug) http://developer.berlios.de/projects/bcd/ and
    >>>>> http://developer.berlios.de/dbimage.php?id=1112 for example.
    >>>
    >>>
    >>>
    >>>
    >>>> Your project looks very interesting. It would be better if it displayed
    >>>> an error message if it can't find the '_bcdrc' file. If you run it from
    >>>> windoze it just appears and disapears.
    >>>>
    >>>> How about allowing the '_bcdrc' file to be in the same directory as the
    >>>> script as well.
    >>>
    >>>
    >>>
    >>> Cool. A user!
    >>> Thanks for the comments. I'll add searching next to the application on
    >>> win32 platforms.
    >>>
    >>>
    >>>> Any chance of you releasing the Tkinter text interface as a separate
    >>>> library, with a less restrictive license ? It looks very good - but I
    >>>> can't use it in my projects if it is GPL.
    >>>
    >>>
    >>>
    >>> It's just standard Tkinter Listbox with key bindings and it's under 160
    >>> lines of code. Nothing special here.
    >>>
    >>> Bye.
    >>> --
    >>> ------------------------------------------------------------------------
    >>> Miki Tebeka <>
    >>> http://tebeka.bizhat.com
    >>> The only difference between children and adults is the price of the toys

    >>
    >>
    >>
    >> i have not used Tcl/Tk before, and don't know how to solve the problem -
    >>
    >> after i've made config file (.bcdrc) and run the script on FreeBSD 4,
    >> i've got the message:
    >>
    >> Traceback (most recent call last):
    >> File "./bcd.py", line 177, in ?
    >> root = Tk() # Main window
    >> File "/usr/local/lib/python2.2/lib-tk/Tkinter.py", line 1511, in
    >> __init__
    >> self.tk = _tkinter.create(screenName, baseName, className)
    >> TclError: no display name and no $DISPLAY environment variable
    >>
    >>

    > This is a problem with window creation. I presume it's occurring because
    > you aren't running the program in a windowed environment - if you've
    > logged in through a graphical screen such as xdm and you are running the
    > program in a window on a desktop the DISPLAY environment variable is
    > normally set up for you.
    >
    > Perhaps you are just telnetting in from a remote system?
    >
    > regards
    > Steve


    yes i'm telneting (sshing), that is the reason why i'm looking for
    libs for making text interfaces.
    i know there is a project named "anakonda" - red hat linux installer,
    but it is uses specific C libs. i can use only python libs.

    --
    Best regards,
    Maxim
     
    Maxim Kasimov, Dec 30, 2004
    #7
  8. On 2004-12-30, Maxim Kasimov <> wrote:

    > yes i'm telneting (sshing), that is the reason why i'm looking
    > for libs for making text interfaces. i know there is a project
    > named "anakonda" - red hat linux installer, but it is uses
    > specific C libs. i can use only python libs.


    By "only python libs" do you mean only the stuff that's
    included in the vanilla CPython distro? If that's the case,
    then curses is pretty much the only choice. Last time I
    looked, it didn't work on Windows.

    I've used the snack module (which is what anaconda uses), and
    it's very handy for simple text-based UIs.

    --
    Grant Edwards grante Yow! I'm having a
    at RELIGIOUS EXPERIENCE... and
    visi.com I don't take any DRUGS
     
    Grant Edwards, Dec 30, 2004
    #8
  9. Grant Edwards wrote:
    > On 2004-12-30, Maxim Kasimov <> wrote:
    >
    >
    >>yes i'm telneting (sshing), that is the reason why i'm looking
    >>for libs for making text interfaces. i know there is a project
    >>named "anakonda" - red hat linux installer, but it is uses
    >>specific C libs. i can use only python libs.

    >
    >
    > By "only python libs" do you mean only the stuff that's
    > included in the vanilla CPython distro? If that's the case,
    > then curses is pretty much the only choice. Last time I
    > looked, it didn't work on Windows.
    >
    > I've used the snack module (which is what anaconda uses), and
    > it's very handy for simple text-based UIs.
    >

    at ports (FreeBSD) i've found this:
    Port: snack-2.2.7
    Path: /usr/ports/audio/snack
    Info: A sound toolkit for scripting languages

    and at http://rpmfind.net i've found: sound extension for Tcl/Tk and Python

    so if it's about http://www.speech.kth.se/snack/
    not sure is it what i need but will try and thanks for help.

    --
    Best regards,
    Maxim
     
    Maxim Kasimov, Dec 30, 2004
    #9
  10. On 2004-12-30, Maxim Kasimov <> wrote:

    >>>yes i'm telneting (sshing), that is the reason why i'm looking
    >>>for libs for making text interfaces. i know there is a project
    >>>named "anakonda" - red hat linux installer, but it is uses
    >>>specific C libs. i can use only python libs.

    >>
    >> By "only python libs" do you mean only the stuff that's
    >> included in the vanilla CPython distro? If that's the case,
    >> then curses is pretty much the only choice. Last time I
    >> looked, it didn't work on Windows.
    >>
    >> I've used the snack module (which is what anaconda uses), and
    >> it's very handy for simple text-based UIs.
    >>

    > at ports (FreeBSD) i've found this:
    > Port: snack-2.2.7
    > Path: /usr/ports/audio/snack
    > Info: A sound toolkit for scripting languages


    Unfortunately there are two modules with the same name. The one
    you found is a sound library.

    The other one is the Python wrapped version of the newt
    library. I've no idea why the Python newt module is called
    "snack". The new source code comes with the Python "snack"
    module wrapper.

    The most recent version I have handy is available at

    ftp://ftp.visi.com/users/grante/stuff/newt-0.50.tar.gz

    There appear to be more recent versions available:

    http://rpmfind.net/linux/RPM/fedora/3/i386/newt-0.51.6-5.i386.html
    http://linux.maruhn.com/sec/newt.html
    http://www.freshports.org/devel/newt

    There's a rather outdated tutorial on using Newt v0.30 from C:

    http://www.oksid.ch/gnewt/tutorial.html

    Newt requires the s-lang library:

    http://www.s-lang.org/

    --
    Grant Edwards grante Yow! Imagine--a WORLD
    at without POODLES...
    visi.com
     
    Grant Edwards, Dec 30, 2004
    #10
  11. Grant Edwards wrote:
    > On 2004-12-30, Maxim Kasimov <> wrote:
    >
    >
    >>>>yes i'm telneting (sshing), that is the reason why i'm looking
    >>>>for libs for making text interfaces. i know there is a project
    >>>>named "anakonda" - red hat linux installer, but it is uses
    >>>>specific C libs. i can use only python libs.
    >>>
    >>>By "only python libs" do you mean only the stuff that's
    >>>included in the vanilla CPython distro? If that's the case,
    >>>then curses is pretty much the only choice. Last time I
    >>>looked, it didn't work on Windows.
    >>>
    >>>I've used the snack module (which is what anaconda uses), and
    >>>it's very handy for simple text-based UIs.
    >>>

    >>
    >>at ports (FreeBSD) i've found this:
    >> Port: snack-2.2.7
    >> Path: /usr/ports/audio/snack
    >> Info: A sound toolkit for scripting languages

    >
    >
    > Unfortunately there are two modules with the same name. The one
    > you found is a sound library.
    >
    > The other one is the Python wrapped version of the newt
    > library. I've no idea why the Python newt module is called
    > "snack". The new source code comes with the Python "snack"
    > module wrapper.
    >
    > The most recent version I have handy is available at
    >
    > ftp://ftp.visi.com/users/grante/stuff/newt-0.50.tar.gz
    >
    > There appear to be more recent versions available:
    >
    > http://rpmfind.net/linux/RPM/fedora/3/i386/newt-0.51.6-5.i386.html
    > http://linux.maruhn.com/sec/newt.html
    > http://www.freshports.org/devel/newt
    >
    > There's a rather outdated tutorial on using Newt v0.30 from C:
    >
    > http://www.oksid.ch/gnewt/tutorial.html
    >
    > Newt requires the s-lang library:
    >
    > http://www.s-lang.org/
    >

    that is exactly i need. i'll try it.

    thanks.

    --
    Best regards,
    Maxim
     
    Maxim Kasimov, Dec 30, 2004
    #11
  12. Maxim Kasimov

    Fuzzyman Guest

    Miki Tebeka wrote:
    > Hello Fuzzyman,
    >
    > > > > Are there widely used and recommended Python libraries that

    will
    > > > > let me makes a portable text user interface?
    > > > If you just need a text-like interface you can use Tkinter.
    > > > See (shameless plug) http://developer.berlios.de/projects/bcd/

    and
    > > > http://developer.berlios.de/dbimage.php?id=1112 for example.

    >
    > > Your project looks very interesting. It would be better if it

    displayed
    > > an error message if it can't find the '_bcdrc' file. If you run it

    from
    > > windoze it just appears and disapears.
    > >
    > > How about allowing the '_bcdrc' file to be in the same directory as

    the
    > > script as well.

    > Cool. A user!
    > Thanks for the comments. I'll add searching next to the application

    on
    > win32 platforms.
    >

    Thanks. Your script could be very useful to me... but I did my usual
    trick of making my comments before *properly* understanding what you
    were trying to do.

    As it is designed as a command line tool - your error message is
    probably fine.

    Anyway - thanks for your work.

    Regards,

    Fuzzyman
    http://www.voidspace.org.uk/python/index.shtml

    > > Any chance of you releasing the Tkinter text interface as a

    separate
    > > library, with a less restrictive license ? It looks very good - but

    I
    > > can't use it in my projects if it is GPL.

    > It's just standard Tkinter Listbox with key bindings and it's under

    160
    > lines of code. Nothing special here.
    >
    > Bye.
    > --
    >

    ------------------------------------------------------------------------
    > Miki Tebeka <>
    > http://tebeka.bizhat.com
    > The only difference between children and adults is the price of the

    toys
     
    Fuzzyman, Dec 30, 2004
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eli Bendersky
    Replies:
    1
    Views:
    1,181
    Mike Treseler
    Mar 1, 2006
  2. Replies:
    1
    Views:
    559
  3. Robert
    Replies:
    1
    Views:
    286
    Michel Claveau/Hamster
    Jan 19, 2004
  4. Tim Golden
    Replies:
    2
    Views:
    357
    Robert
    Jan 21, 2004
  5. Replies:
    7
    Views:
    930
Loading...

Share This Page