Skip to main content

Very Simple Graphical library for Python shell script

Project description

#!/usr/bin/env python
"""
Example of VSGUI to describe what it does....

@author Hsin-Yi Chen (hychen) <ossug.hychen@gmail.com>

How to use

user@host$ python READEME.txt

"""
import sys
import time
import random

from vsgui import *

anwsers = ["loves you", "don't love you"]

notice("Hey! Example of VSGUI is running!")
input_yesno("Do you want to start this example to see how it work?", y="Sure", n="No! I don't want") \
or die("OK! but please read the codes if you have time.")
username = input_text("Your name:")
check_passwd(username, text="(passwd is %s)" % username)

usersex = input_ab("What is your sex?", 'male', 'famel')
liked_sex = input_radiolist(['sex'], ['','male', '','famel', '', 'unknow'], text="What is your lover's sex?")

def get_anwser():
update = progress('Starting to ask Mazo-Po', auto_close=True)
update('20', "sending your questions to sky")
time.sleep(1)
update('40', "Mazo-Po hear questions")
time.sleep(1)
update('60', "Mazo-Po is asking A-pi-PO")
time.sleep(1)
update('80', "A-pi-Po is thinking")
anwser = random.choice(anwsers)
time.sleep(1)
update('100', "A-pi-Po get a anwser")
return anwser

accept = False
while not accept:
anwser = get_anwser() or die("can not get anwser!")
msg = ['Your are %s, a %s' % (username, usersex),
'your lover is a %s' % liked_sex,
'and he/her %s' % anwser]
msg.append("Do you accept this?")

accept = input_yesno(','.join(msg), y='Yes', n='Fuck!')

# save result
# @TODO write example for saving file

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.1.3.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vsgui-0.1.3.linux-i686.exe (68.0 kB view details)

Uploaded Source

File details

Details for the file vsgui-0.1.3.tar.gz.

File metadata

  • Download URL: vsgui-0.1.3.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for vsgui-0.1.3.tar.gz
Algorithm Hash digest
SHA256 07d924cd527defc5a140c262101170e652dc0547c4ddf0f331a52e3460940f76
MD5 70132c4440cd7e433dc144f539968d63
BLAKE2b-256 09b0f430d222fbfba0029f19dc824d58f59a2a07393ee093261ce659095197aa

See more details on using hashes here.

File details

Details for the file vsgui-0.1.3.linux-i686.exe.

File metadata

  • Download URL: vsgui-0.1.3.linux-i686.exe
  • Upload date:
  • Size: 68.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for vsgui-0.1.3.linux-i686.exe
Algorithm Hash digest
SHA256 7b5b26936f4ca8103236465415988f1e985b651c8339aea3e2534f4ef0434f39
MD5 673382984799545dfc3e127948b60b8e
BLAKE2b-256 10956cd20c13df9255f26132e860f6fd31e1cef69c4586d03d4889545a605f43

See more details on using hashes here.

Supported by

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