pdialog is a simple python module that wraps Xdialog or dialog.
Specifically:
If X is working ($DISPLAY is defined and xdpyinfo returns true):
If we can find Xdialog, then use Xdialog
Else if we can find a terminal emulator and dialog, then use
dialog in a terminal emulator
Else if we can find dialog, use that on the current tty
Else error out
Else if we can find dialog, use dialog on the current tty
Else error out
It supports the following Xdialog/dialog functions:
def yesno(self,text,height,width,defaultno=0):
def msgbox(self,text,height,width):
def textbox(self,file,height,width):
def menu(self,text,height,width,*options):
def checklist(self,text,height,width,*options):
def radiolist(self,text,height,width,*options):
def inputbox(self,text,height,width,init=''):
You can download it here
This software is owned by The university of California, Irvine ,
and is not distributed under
any version of the GPL. GPL is a fine series of licenses, but the owners of the software need it to be distributed under these terms.
Bugs
Should probably be modified to work with zenity, and perhaps
also adesklets.
See also
Christopher Arndt 's python wrapper for Xdialog.
Hits: 4452 Timestamp: 2024-11-22 12:38:38 PST
Back to Dan's tech tidbits
You can e-mail the author with questions or comments: