Skip to main content

Very Simple Graphical library for Python shell script

Project description

VSGUI - Very Simple Graphic Interface Library for Python


It proides a simple functions to comuunicate with `zenity` which
is a program that will display GTK+ dialogs, and return
(either in the return code, or on standard output) the users input.
This allows you to present information, and ask for information from
the user, from all manner of shell scripts.


* Python >=2.5
* Python UCLTIP module >= 0.6-1 (
* Zenity

How To install

for Ubuntu Users


$ apt-get install python-ucltip

for Debian Users

$ apt-get install zenity
$ apt-get install python-ucltip

VSGUI is not in Debian/Ubuntu archive.
right now please use `` to install

How To Use

The source code includes some examples which are in example directory, so you can take a qucik look before you
start coding, and thre are two part of this library as below

1. High Level API functions

Before start, you need to import api funcitons:

from vsgui.api import *


from vsgui.api import *

# information dialog

# warring dialog

# error dialog

# error dialog and terminate script

# notice dialog (does not work in Unity)

Input Text

# input text
ask_text(text, initial=None)

# input password,

# check password
# - 1234 is the password we except user to type
# - 5 means user can try to input 5 times if the password is wrong
# - password is wrong is just a error message shows in an error dialog
check_passwd('1234', 5, 'password is wrong')



# ask user the anwser is yes or no
ask_yesno(text, y=None, n=None):

# ask user select a or b
ask_ab(text, a, b):

# ask user passowrd, and check it
check_passwd(wanted, count=3, text='', errmsg='wrong password, try again!')


# launch a progress bar and create a update function
update = progress('downloading files')

# update progress bar message ot 'md5sum checking' and progessive number to 90
update(90, 'md5sum checking')

# launch a progress bar



# ask user to select a file path

# ask user to select multiple file paths

# ask user to select a directory path

# ask user to select multiple directory paths



2. Zenity Class

if api functions is not enough, you can use Zenity class direcly to get
more powerful feature.

from vsgui.zenity import Zenity
z = Zenity()

# same as executing 'zenity --file-selection --filename=a.txt'

Get invlolved

if you are interesting to help, please contact author,
Hychen, his email is <ossug.hychen at>.

The VCS of code is avaliabl on

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vsgui-0.3.3.tar.gz (6.6 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page