portable text user interface

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Maxim Kasimov

    #1

    portable text user interface

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

    --

    Best regards,
    Maxim
  • Miki Tebeka

    #2
    Re: portable text user interface

    Hello Maxim,
    [color=blue]
    > Are there widely used and recommended Python libraries that will
    > let me makes a portable text user interface?[/color]
    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 <miki.tebeka@zo ran.com>

    The only difference between children and adults is the price of the toys

    Comment

    • Fuzzyman

      #3
      Re: portable text user interface


      Miki Tebeka wrote:[color=blue]
      > Hello Maxim,
      >[color=green]
      > > Are there widely used and recommended Python libraries that will
      > > let me makes a portable text user interface?[/color]
      > 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.
      >[/color]

      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
      [color=blue]
      > If you need something that runs through telnet/ssh ... than curses is[/color]
      what[color=blue]
      > your looking for. There's a win32 port to it somewhere.
      >
      > Bye.
      > --
      >[/color]
      ------------------------------------------------------------------------[color=blue]
      > Miki Tebeka <miki.tebeka@zo ran.com>
      > http://tebeka.bizhat.com
      > The only difference between children and adults is the price of the[/color]
      toys

      Comment

      • Miki Tebeka

        #4
        Re: portable text user interface

        Hello Fuzzyman,
        [color=blue][color=green][color=darkred]
        > > > Are there widely used and recommended Python libraries that will
        > > > let me makes a portable text user interface?[/color]
        > > 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.[/color][/color]
        [color=blue]
        > 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.[/color]
        Cool. A user!
        Thanks for the comments. I'll add searching next to the application on
        win32 platforms.
        [color=blue]
        > 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.[/color]
        It's just standard Tkinter Listbox with key bindings and it's under 160
        lines of code. Nothing special here.

        Bye.
        --
        ------------------------------------------------------------------------
        Miki Tebeka <miki.tebeka@zo ran.com>

        The only difference between children and adults is the price of the toys

        Comment

        • Maxim Kasimov

          #5
          Re: portable text user interface

          Miki Tebeka wrote:[color=blue]
          > Hello Fuzzyman,
          >
          >[color=green][color=darkred]
          >>>>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.[/color][/color]
          >
          >[color=green]
          >>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.[/color]
          >
          > Cool. A user!
          > Thanks for the comments. I'll add searching next to the application on
          > win32 platforms.
          >
          >[color=green]
          >>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.[/color]
          >
          > It's just standard Tkinter Listbox with key bindings and it's under 160
          > lines of code. Nothing special here.
          >
          > Bye.
          > --
          > ------------------------------------------------------------------------
          > Miki Tebeka <miki.tebeka@zo ran.com>
          > http://tebeka.bizhat.com
          > The only difference between children and adults is the price of the toys[/color]

          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

          Comment

          • Steve Holden

            #6
            Re: portable text user interface

            Maxim Kasimov wrote:
            [color=blue]
            > Miki Tebeka wrote:
            >[color=green]
            >> Hello Fuzzyman,
            >>
            >>[color=darkred]
            >>>>> 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.[/color]
            >>
            >>
            >>[color=darkred]
            >>> 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.[/color]
            >>
            >>
            >> Cool. A user!
            >> Thanks for the comments. I'll add searching next to the application on
            >> win32 platforms.
            >>
            >>[color=darkred]
            >>> 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.[/color]
            >>
            >>
            >> It's just standard Tkinter Listbox with key bindings and it's under 160
            >> lines of code. Nothing special here.
            >>
            >> Bye.
            >> --
            >> ------------------------------------------------------------------------
            >> Miki Tebeka <miki.tebeka@zo ran.com>
            >> http://tebeka.bizhat.com
            >> The only difference between children and adults is the price of the toys[/color]
            >
            >
            > 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
            >
            >[/color]
            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

            Comment

            • Maxim Kasimov

              #7
              Re: portable text user interface

              Steve Holden wrote:[color=blue]
              > Maxim Kasimov wrote:
              >[color=green]
              >> Miki Tebeka wrote:
              >>[color=darkred]
              >>> 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 <miki.tebeka@zo ran.com>
              >>> http://tebeka.bizhat.com
              >>> The only difference between children and adults is the price of the toys[/color]
              >>
              >>
              >>
              >> 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
              >>
              >>[/color]
              > 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[/color]

              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

              Comment

              • Grant Edwards

                #8
                Re: portable text user interface

                On 2004-12-30, Maxim Kasimov <kasimov@i.com. ua> wrote:
                [color=blue]
                > 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.[/color]

                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

                Comment

                • Maxim Kasimov

                  #9
                  Re: portable text user interface

                  Grant Edwards wrote:[color=blue]
                  > On 2004-12-30, Maxim Kasimov <kasimov@i.com. ua> wrote:
                  >
                  >[color=green]
                  >>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.[/color]
                  >
                  >
                  > 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.
                  >[/color]
                  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

                  Comment

                  • Grant Edwards

                    #10
                    Re: portable text user interface

                    On 2004-12-30, Maxim Kasimov <kasimov@i.com. ua> wrote:
                    [color=blue][color=green][color=darkred]
                    >>>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.[/color]
                    >>
                    >> 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.
                    >>[/color]
                    > at ports (FreeBSD) i've found this:
                    > Port: snack-2.2.7
                    > Path: /usr/ports/audio/snack
                    > Info: A sound toolkit for scripting languages[/color]

                    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:



                    Newt is a windowing toolkit for text mode built from the slang library. It allows color text mode applications to easily use stackable windows, push buttons, check boxes, radio buttons, lists, entry fields, labels, and displayable text. Scrollbars are supported, and forms may be nested to provide extra functionality. Besides the newt library, this port provides whiptail, which may be used from shell scripts similarly to Savio Lam's "dialog". Newt provides the textual interface for the Red Hat and Debian boot disks.


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



                    Newt requires the s-lang library:



                    --
                    Grant Edwards grante Yow! Imagine--a WORLD
                    at without POODLES...
                    visi.com

                    Comment

                    • Maxim Kasimov

                      #11
                      Re: portable text user interface

                      Grant Edwards wrote:[color=blue]
                      > On 2004-12-30, Maxim Kasimov <kasimov@i.com. ua> wrote:
                      >
                      >[color=green][color=darkred]
                      >>>>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.
                      >>>[/color]
                      >>
                      >>at ports (FreeBSD) i've found this:
                      >> Port: snack-2.2.7
                      >> Path: /usr/ports/audio/snack
                      >> Info: A sound toolkit for scripting languages[/color]
                      >
                      >
                      > 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/....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/
                      >[/color]
                      that is exactly i need. i'll try it.

                      thanks.

                      --
                      Best regards,
                      Maxim

                      Comment

                      • Fuzzyman

                        #12
                        Re: portable text user interface


                        Miki Tebeka wrote:[color=blue]
                        > Hello Fuzzyman,
                        >[color=green][color=darkred]
                        > > > > Are there widely used and recommended Python libraries that[/color][/color][/color]
                        will[color=blue][color=green][color=darkred]
                        > > > > 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/[/color][/color][/color]
                        and[color=blue][color=green][color=darkred]
                        > > > http://developer.berlios.de/dbimage.php?id=1112 for example.[/color][/color]
                        >[color=green]
                        > > Your project looks very interesting. It would be better if it[/color][/color]
                        displayed[color=blue][color=green]
                        > > an error message if it can't find the '_bcdrc' file. If you run it[/color][/color]
                        from[color=blue][color=green]
                        > > windoze it just appears and disapears.
                        > >
                        > > How about allowing the '_bcdrc' file to be in the same directory as[/color][/color]
                        the[color=blue][color=green]
                        > > script as well.[/color]
                        > Cool. A user!
                        > Thanks for the comments. I'll add searching next to the application[/color]
                        on[color=blue]
                        > win32 platforms.
                        >[/color]
                        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
                        [color=blue][color=green]
                        > > Any chance of you releasing the Tkinter text interface as a[/color][/color]
                        separate[color=blue][color=green]
                        > > library, with a less restrictive license ? It looks very good - but[/color][/color]
                        I[color=blue][color=green]
                        > > can't use it in my projects if it is GPL.[/color]
                        > It's just standard Tkinter Listbox with key bindings and it's under[/color]
                        160[color=blue]
                        > lines of code. Nothing special here.
                        >
                        > Bye.
                        > --
                        >[/color]
                        ------------------------------------------------------------------------[color=blue]
                        > Miki Tebeka <miki.tebeka@zo ran.com>
                        > http://tebeka.bizhat.com
                        > The only difference between children and adults is the price of the[/color]
                        toys

                        Comment

                        Working...