portable text user interface

M

Maxim Kasimov

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

Miki Tebeka

F

Fuzzyman

Miki said:
Hello Maxim,

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 <[email protected]>
http://tebeka.bizhat.com
The only difference between children and adults is the price of the
toys
 
M

Miki Tebeka

Hello Fuzzyman,
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.
 
M

Maxim Kasimov

Miki said:
Hello Fuzzyman,



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



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

Bye.
--

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
 
S

Steve Holden

Maxim said:
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
 
M

Maxim Kasimov

Steve said:
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.
 
G

Grant Edwards

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.
 
M

Maxim Kasimov

Grant said:
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.
 
G

Grant Edwards

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/
 
M

Maxim Kasimov

Grant said:
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.
 
F

Fuzzyman

Miki said:
Hello Fuzzyman,


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
It's just standard Tkinter Listbox with key bindings and it's under 160
lines of code. Nothing special here.

Bye.
--
------------------------------------------------------------------------
Miki Tebeka <[email protected]>
http://tebeka.bizhat.com
The only difference between children and adults is the price of the
toys
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top