gtk-stream 0.13.2__py3-none-any.whl → 0.13.3__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
gtk_stream/_version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.13.2'
16
- __version_tuple__ = version_tuple = (0, 13, 2)
15
+ __version__ = version = '0.13.3'
16
+ __version_tuple__ = version_tuple = (0, 13, 3)
gtk_stream/application.py CHANGED
@@ -19,7 +19,7 @@ import threading
19
19
  import signal
20
20
 
21
21
  from . import Gtk, GLib, Gdk
22
- from .common import printEvent
22
+ from .common import print_event
23
23
  from .properties import parse_property, get_prop_type, set_parse_prop
24
24
 
25
25
  class _Object:
@@ -117,7 +117,7 @@ class GtkStreamApp(Gtk.Application):
117
117
  set_parse_prop(self, win, attr_name, attr_val)
118
118
  self.named_windows[id] = win
119
119
  win.set_child(document.render())
120
- win.connect('close-request', printEvent(self.logger, 'close-request', id))
120
+ win.connect('close-request', print_event(self.logger, 'close-request', id))
121
121
  win.present()
122
122
 
123
123
  @app_message('style', style_store)
gtk_stream/common.py CHANGED
@@ -24,7 +24,7 @@ def _data_str_by(get_data):
24
24
  return ":"+get_data(*args)
25
25
  return ret
26
26
 
27
- def printEvent(logger, event, id, retval = None, get_data = None):
27
+ def print_event(logger, event, id, retval = None, get_data = None):
28
28
  data_str = _data_str_default if get_data == None else _data_str_by(get_data)
29
29
  def ret(*args):
30
30
  try:
@@ -45,14 +45,14 @@ class Logger:
45
45
  def __init__(self, level = LogLevel.WARN, stderr = sys.stderr):
46
46
  self.stderr = stderr
47
47
  self.level = level
48
- self.debug = self._initLogger(LogLevel.DEBUG)
49
- self.info = self._initLogger(LogLevel.INFO)
50
- self.warn = self._initLogger(LogLevel.WARN)
51
- self.error = self._initLogger(LogLevel.ERROR)
48
+ self.debug = self._init_logger(LogLevel.DEBUG)
49
+ self.info = self._init_logger(LogLevel.INFO)
50
+ self.warn = self._init_logger(LogLevel.WARN)
51
+ self.error = self._init_logger(LogLevel.ERROR)
52
52
  def flush(self):
53
53
  self.stderr.flush()
54
54
 
55
- def _initLogger(self, level):
55
+ def _init_logger(self, level):
56
56
  if self.level.value <= level.value:
57
57
  def ret(fmt, *args):
58
58
  print((f"[{level.name}]: {fmt}") % args, file=self.stderr)
@@ -15,7 +15,7 @@
15
15
  # along with this program. If not, see <https://www.gnu.org/licenses/>.
16
16
 
17
17
  from ...properties import parse_property, get_prop_type
18
- from ...common import printEvent
18
+ from ...common import print_event
19
19
 
20
20
  class Document:
21
21
  __g_class__ = None
@@ -28,8 +28,8 @@ class Document:
28
28
  }
29
29
  self.children = []
30
30
 
31
- def connect_event(self, w, event, name, **printEvent_kwargs):
32
- w.connect(event, printEvent(self.app.logger, name, self.id, **printEvent_kwargs))
31
+ def connect_event(self, w, event, name, **print_event_kwargs):
32
+ w.connect(event, print_event(self.app.logger, name, self.id, **print_event_kwargs))
33
33
  def add_child(self, child):
34
34
  self.children.append(child)
35
35
 
gtk_stream/parser.py CHANGED
@@ -65,7 +65,7 @@ class GtkStreamXMLHandler(sax.ContentHandler):
65
65
  # class. This allows defining new messages without
66
66
  # touching the parser
67
67
  self.messages = {
68
- f.__tag_name__: self.startMessage(functools.partial(f,self.app), f.__store__)
68
+ f.__tag_name__: self.start_message(functools.partial(f,self.app), f.__store__)
69
69
  for f in self.app.__class__.__dict__.values()
70
70
  if hasattr(f, '__tag_name__')
71
71
  }
@@ -103,7 +103,7 @@ class GtkStreamXMLHandler(sax.ContentHandler):
103
103
  case _:
104
104
  raise Exception("Error: expected 'application' tag")
105
105
 
106
- def startMessage(self, f, child = None):
106
+ def start_message(self, f, child = None):
107
107
  if child != None:
108
108
  def ret(name,attrs):
109
109
  getC, setC, setChars = child()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: gtk-stream
3
- Version: 0.13.2
3
+ Version: 0.13.3
4
4
  Summary: A simple stream-oriented GUI protocol
5
5
  Author-email: Marc Coiffier <marc.coiffier@univ-grenoble-alpes.fr>
6
6
  Project-URL: Homepage, https://coiffier.net/projects/gtk-stream/
@@ -1,14 +1,14 @@
1
1
  gtk_stream/__init__.py,sha256=y6JLknVFexWrSo_Zl7-TXrPR6EQ5XVMeFO1bUzLN9Lg,98
2
- gtk_stream/_version.py,sha256=ByxP_AGaDBx1nhN9W4fte2GtMXAPh9eMZ4pSGlztQPc,413
3
- gtk_stream/application.py,sha256=nPmMtAvwcikeqanL537oMxRPMcaRZQsmETEVfy-vqvM,5498
2
+ gtk_stream/_version.py,sha256=VXQPyzbmOGe0nuuEEus9EQY40THABR5BB9WWse8Z8LI,413
3
+ gtk_stream/application.py,sha256=SpMUuqYyyW056CIa0kQXhMDdI_e69HjsFBa4ihPomvQ,5500
4
4
  gtk_stream/command_line.py,sha256=g7Sed0ydnDGKyWHT09murwR-3vZyIKXRWgM4Oi0qDE4,3278
5
- gtk_stream/common.py,sha256=xdscxYgBg_Ux6iyk26gB-AMSgoUIqlZUPgso5YS_gKE,2106
6
- gtk_stream/parser.py,sha256=5D5VlAHJZghNKHbZJBMWMaBuTcThStQE_58PwC37Uos,5707
5
+ gtk_stream/common.py,sha256=2USRh42DmmxtPO1y8gpeU0hMuHfhcqJBPuxtvd46YHg,2112
6
+ gtk_stream/parser.py,sha256=lt1cHYwhrd0SwSQfbxtbK6NdwbnFmgeBDIeNY0eepwc,5709
7
7
  gtk_stream/properties.py,sha256=DCcRCP3REdfWDkPEVUsNHi1b2XxXU5toL3pf_SxmqQ4,4039
8
8
  gtk_stream/documents/__init__.py,sha256=cMWSmjD2_5oJ2EoSk3Jy9-LPeAGKDIidYNRJvqUzdU8,856
9
9
  gtk_stream/documents/classes/Box.py,sha256=TIxRLO0_SjRpE3soimHuNE0q4jDbU_BUCpcuspSPAzg,1382
10
10
  gtk_stream/documents/classes/Button.py,sha256=21bVI7DUWmiusboxdsimTgcqKtLqzQydhS9ifIt4R64,1512
11
- gtk_stream/documents/classes/Document.py,sha256=_SHqP0ebCDTag0dmi-LdlhopCImtgy0utVp5G3IqgHM,2357
11
+ gtk_stream/documents/classes/Document.py,sha256=DWDH4nl0INxXs_z-vTX_z3E3eHC5JeU3lVWhfzW24Pw,2361
12
12
  gtk_stream/documents/classes/Dropdown.py,sha256=8fIUX1HCWIjUfKLPy9NYsW6OskhkontoNDTsCZ7qKxw,2446
13
13
  gtk_stream/documents/classes/Entry.py,sha256=KcBwjSu4tI30bQxPlSFSLPxFEUbTaqAdoAzd0XSQciY,1112
14
14
  gtk_stream/documents/classes/FlowBox.py,sha256=UoVYS2j_osOV-IgbVoaqluTBCiaXus5dq2e9qhAu2Xo,1225
@@ -24,8 +24,8 @@ gtk_stream/documents/classes/Separator.py,sha256=uw_EgAKs_6pNA8nrOLzruIlJfk4uaog
24
24
  gtk_stream/documents/classes/Stack.py,sha256=icg1TOlCD0IFPv_42uMa7jHbEAgEnuELrTEbnTKiPgU,1568
25
25
  gtk_stream/documents/classes/Switch.py,sha256=jQVuxqS9Pmpp1ymB_dbJPxasJNpm4e35ry0JYPHdAsk,1275
26
26
  gtk_stream/documents/classes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
- gtk_stream-0.13.2.dist-info/METADATA,sha256=xLHfeOKVhS1ANoQYpmoHm10u6_qLzTYBzrwydeAdGkY,807
28
- gtk_stream-0.13.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
29
- gtk_stream-0.13.2.dist-info/entry_points.txt,sha256=PmhKTb4MMQM6dN2HJcoDSMI8L0lZIFIlFn-BgdfPDpo,60
30
- gtk_stream-0.13.2.dist-info/top_level.txt,sha256=vE9zfHGe9Ke7FSe0wBK2WYJI-BpcQNu6xDC3Cu5O8rQ,11
31
- gtk_stream-0.13.2.dist-info/RECORD,,
27
+ gtk_stream-0.13.3.dist-info/METADATA,sha256=L2ImFjATPoLPMMJwWk7jY2Jo6n0OpDGUOTTB8SedCZA,807
28
+ gtk_stream-0.13.3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
29
+ gtk_stream-0.13.3.dist-info/entry_points.txt,sha256=PmhKTb4MMQM6dN2HJcoDSMI8L0lZIFIlFn-BgdfPDpo,60
30
+ gtk_stream-0.13.3.dist-info/top_level.txt,sha256=vE9zfHGe9Ke7FSe0wBK2WYJI-BpcQNu6xDC3Cu5O8rQ,11
31
+ gtk_stream-0.13.3.dist-info/RECORD,,