portable text user interface
Steve Holden
steve at holdenweb.com
Thu Dec 30 08:47:08 EST 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 <miki.tebeka at zoran.com>
>> 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
More information about the Python-list
mailing list