• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
讓 Python Script 擁有圖形化介面的簡單方法
 

讓 Python Script 擁有圖形化介面的簡單方法

on

  • 1,411 views

by 陳信屹 (hychen)

by 陳信屹 (hychen)

Statistics

Views

Total Views
1,411
Views on SlideShare
1,411
Embed Views
0

Actions

Likes
0
Downloads
12
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    讓 Python Script 擁有圖形化介面的簡單方法 讓 Python Script 擁有圖形化介面的簡單方法 Presentation Transcript

    • I wrote a script
    • Graphicinterface Wanted
    • I dont want to use PyGTK, PyQT
    • there is a toolnamed zenity
    • UCLTIPUse Command Line Tool In Python
    • Command → Python ClassCommand Arugs → method argsCommand Options → method keyword args
    • $ zenity –info –text Hi All#!/usr/bin/pythonfrom ucltip import CmdDispatcherzenity = CmdDispatcher(zenity)obj = zenity()obj.info(text=Hi All)
    • Info(“Hi All”)
    • VSGUI Very Simple GUIProvide a syntax sugar to use zenity in Python
    • Progressive Barupdate=progress("processing text....")import timeupdate(20, "setp 1") # update % and titletime.sleep(1)update(40, "setp 2") To Demo --->
    • Module Name in PyPy: vsgui apt-get install python-vsgui