Advertisement
metalx1000

Basic HTML Webkit Wrapper - Portal

May 24th, 2013
3,083
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. import webkit, gtk, os
  4.  
  5. win = gtk.Window()
  6. win.resize(600,800)
  7. win.connect('destroy', lambda w: gtk.main_quit())
  8.  
  9. scroller = gtk.ScrolledWindow()
  10. win.add(scroller)
  11.  
  12. web = webkit.WebView()
  13. path=os.getcwd()
  14. print path
  15.  
  16. web.open("file://" + path + "/index.html")
  17.  
  18. scroller.add(web)
  19.  
  20. win.show_all()
  21.  
  22. gtk.main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement