pyvguicom 1.0.1__py3-none-any.whl → 1.1.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pyvguicom might be problematic. Click here for more details.

pyvguicom/browsewin.py CHANGED
@@ -5,7 +5,8 @@
5
5
  import os, sys, getopt, signal, random, time, warnings
6
6
 
7
7
  realinc = os.path.realpath(os.path.dirname(__file__) + os.sep + "../pycommon")
8
- sys.path.append(realinc)
8
+ if realinc not in sys.path:
9
+ sys.path.append(realinc)
9
10
 
10
11
  from pgutils import *
11
12
  from pggui import *
@@ -13,7 +14,6 @@ from pgsimp import *
13
14
 
14
15
  import gi
15
16
  gi.require_version("Gtk", "3.0")
16
- #gi.require_version('WebKit2', '4.0')
17
17
 
18
18
  from gi.repository import Gtk
19
19
  from gi.repository import Gdk
@@ -21,15 +21,12 @@ from gi.repository import GLib
21
21
  from gi.repository import GObject
22
22
  from gi.repository import Pango
23
23
 
24
- ret = ""
24
+ from pedlib import pedconfig
25
25
 
26
- try:
27
- import pgwkit
28
- except:
29
- print("Cannot load WebKit2", sys.exc_info())
30
- sys.exit(1)
26
+ import pgwkit
27
+ #print("pgwkit:", pgwkit)
31
28
 
32
- class brow_win(Gtk.VBox):
29
+ class browserWin(Gtk.VBox):
33
30
 
34
31
  ''' Collection of URL bar, toolbar, status bar '''
35
32
 
@@ -55,9 +52,11 @@ class brow_win(Gtk.VBox):
55
52
  try:
56
53
  self.webview = pgwkit.pgwebw(self)
57
54
  except:
58
- print("Please install webkit2")
55
+ print("Please install WebKit2", sys.exc_info())
56
+ #if pedconfig.conf.verbose:
57
+ put_exception("start webview")
59
58
  #sys.exit(1)
60
- raise
59
+ #raise
61
60
 
62
61
  #self.old_html = ""
63
62
  self.scroll_win.add(self.webview)
File without changes