Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > portable text user interface

Reply
Thread Tools

portable text user interface

 
 
Maxim Kasimov
Guest
Posts: n/a
 
      12-29-2004
Hi.
Are there widely used and recommended Python libraries that will
let me makes a portable text user interface?

--

Best regards,
Maxim
 
Reply With Quote
 
 
 
 
Miki Tebeka
Guest
Posts: n/a
 
      12-29-2004
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 <(E-Mail Removed)>
http://tebeka.bizhat.com
The only difference between children and adults is the price of the toys
 
Reply With Quote
 
 
 
 
Fuzzyman
Guest
Posts: n/a
 
      12-29-2004

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 <(E-Mail Removed)>
> http://tebeka.bizhat.com
> The only difference between children and adults is the price of the

toys

 
Reply With Quote
 
Miki Tebeka
Guest
Posts: n/a
 
      12-30-2004
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 <(E-Mail Removed)>
http://tebeka.bizhat.com
The only difference between children and adults is the price of the toys
 
Reply With Quote
 
Maxim Kasimov
Guest
Posts: n/a
 
      12-30-2004
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 <(E-Mail Removed)>
> 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
 
Reply With Quote
 
Steve Holden
Guest
Posts: n/a
 
      12-30-2004
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 <(E-Mail Removed)>
>> 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
 
Reply With Quote
 
Maxim Kasimov
Guest
Posts: n/a
 
      12-30-2004
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 <(E-Mail Removed)>
>>> 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
 
Reply With Quote
 
Grant Edwards
Guest
Posts: n/a
 
      12-30-2004
On 2004-12-30, Maxim Kasimov <(E-Mail Removed)> 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
 
Reply With Quote
 
Maxim Kasimov
Guest
Posts: n/a
 
      12-30-2004
Grant Edwards wrote:
> On 2004-12-30, Maxim Kasimov <(E-Mail Removed)> 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
 
Reply With Quote
 
Grant Edwards
Guest
Posts: n/a
 
      12-30-2004
On 2004-12-30, Maxim Kasimov <(E-Mail Removed)> 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/....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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Portable Python - free portable development environment ! perica.zivkovic@gmail.com Python 7 01-13-2007 11:19 AM
portable (VHDL) vs. non-portable (altera LPM) approaches to signed computations Eli Bendersky VHDL 1 03-01-2006 02:43 PM
User Interface Control on AIX Host for character/text based Application bgibbins@bus-e.com.au Java 1 07-07-2005 06:49 PM
RE: interface to win job scheduler portable from win98 .. winXP /cmdline or COM ? Tim Golden Python 2 01-21-2004 12:25 PM
interface to win job scheduler portable from win98 .. winXP / cmdline or COM ? Robert Python 1 01-19-2004 08:58 PM



Advertisments