mwxlib 1.1.7__py3-none-any.whl → 1.2.0__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 mwxlib might be problematic. Click here for more details.
- mwx/__init__.py +1 -1
- mwx/controls.py +21 -17
- mwx/framework.py +1 -1
- mwx/graphman.py +16 -11
- mwx/mgplt.py +1 -1
- mwx/nutshell.py +53 -71
- mwx/plugins/ffmpeg_view.py +11 -15
- {mwxlib-1.1.7.dist-info → mwxlib-1.2.0.dist-info}/METADATA +1 -1
- {mwxlib-1.1.7.dist-info → mwxlib-1.2.0.dist-info}/RECORD +12 -12
- {mwxlib-1.1.7.dist-info → mwxlib-1.2.0.dist-info}/LICENSE +0 -0
- {mwxlib-1.1.7.dist-info → mwxlib-1.2.0.dist-info}/WHEEL +0 -0
- {mwxlib-1.1.7.dist-info → mwxlib-1.2.0.dist-info}/top_level.txt +0 -0
mwx/__init__.py
CHANGED
|
@@ -8,7 +8,7 @@ from .framework import Frame, MiniFrame, ShellFrame, deb
|
|
|
8
8
|
|
|
9
9
|
## Controls
|
|
10
10
|
from .controls import Param, LParam, Knob, ControlPanel, Clipboard, Icon
|
|
11
|
-
from .controls import Button, ToggleButton, ClassicButton,
|
|
11
|
+
from .controls import Button, ToggleButton, ClassicButton, TextBox, Choice, Gauge, Indicator
|
|
12
12
|
|
|
13
13
|
## Plugman
|
|
14
14
|
## from .graphman import Frame as GraphmanFrame, Layer, Thread, Graph
|
mwx/controls.py
CHANGED
|
@@ -712,24 +712,25 @@ class KnobCtrlPanel(scrolled.ScrolledPanel):
|
|
|
712
712
|
return params
|
|
713
713
|
return filter(lambda c: getattr(c, 'check', None), params)
|
|
714
714
|
|
|
715
|
-
def set_params(self, argv
|
|
715
|
+
def set_params(self, argv, checked_only=False):
|
|
716
716
|
params = self.get_params(checked_only)
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
for p, v in zip(params, argv):
|
|
725
|
-
try:
|
|
726
|
-
p.reset(v) # eval v:str -> value
|
|
727
|
-
except AttributeError:
|
|
728
|
-
p.value = v
|
|
729
|
-
except Exception as e: # failed to eval
|
|
730
|
-
print(f"- Failed to reset {p!r}.", e)
|
|
717
|
+
for p, v in zip(params, argv):
|
|
718
|
+
try:
|
|
719
|
+
p.reset(v) # eval v:str -> value
|
|
720
|
+
except AttributeError:
|
|
721
|
+
p.value = v
|
|
722
|
+
except Exception as e:
|
|
723
|
+
print(f"- Failed to eval {v}:", e)
|
|
731
724
|
|
|
732
|
-
reset_params =
|
|
725
|
+
def reset_params(self, checked_only=False):
|
|
726
|
+
params = self.get_params(checked_only)
|
|
727
|
+
for p in params:
|
|
728
|
+
try:
|
|
729
|
+
p.reset()
|
|
730
|
+
except (AttributeError, TypeError):
|
|
731
|
+
## TypeError might occur if p.reset(v) is called with
|
|
732
|
+
## missing 1 required positional argument.
|
|
733
|
+
pass
|
|
733
734
|
|
|
734
735
|
def copy_to_clipboard(self, checked_only=False):
|
|
735
736
|
params = self.get_params(checked_only)
|
|
@@ -1041,7 +1042,7 @@ class ToggleButton(wx.ToggleButton):
|
|
|
1041
1042
|
self.SetBitmap(Icon(icon))
|
|
1042
1043
|
|
|
1043
1044
|
|
|
1044
|
-
class
|
|
1045
|
+
class TextBox(wx.Control):
|
|
1045
1046
|
"""Text control
|
|
1046
1047
|
|
|
1047
1048
|
Args:
|
|
@@ -1095,6 +1096,9 @@ class TextCtrl(wx.Control):
|
|
|
1095
1096
|
pass
|
|
1096
1097
|
|
|
1097
1098
|
|
|
1099
|
+
TextCtrl = TextBox #: for backward compatibility
|
|
1100
|
+
|
|
1101
|
+
|
|
1098
1102
|
class Choice(wx.Control):
|
|
1099
1103
|
"""Editable Choice (ComboBox) control
|
|
1100
1104
|
|
mwx/framework.py
CHANGED
mwx/graphman.py
CHANGED
|
@@ -16,6 +16,7 @@ import platform
|
|
|
16
16
|
import re
|
|
17
17
|
import wx
|
|
18
18
|
from wx import aui
|
|
19
|
+
from wx import stc
|
|
19
20
|
|
|
20
21
|
from matplotlib import cm
|
|
21
22
|
from matplotlib import colors
|
|
@@ -322,18 +323,22 @@ class LayerInterface(CtrlInterface):
|
|
|
322
323
|
except AttributeError:
|
|
323
324
|
self.parameters = None
|
|
324
325
|
|
|
325
|
-
def copy_params(
|
|
326
|
-
if
|
|
327
|
-
|
|
326
|
+
def copy_params(evt, checked_only=False):
|
|
327
|
+
if isinstance(evt.EventObject, (wx.TextEntry, stc.StyledTextCtrl)):
|
|
328
|
+
evt.Skip()
|
|
329
|
+
elif self.parameters:
|
|
330
|
+
self.copy_to_clipboard(checked_only)
|
|
328
331
|
|
|
329
|
-
def paste_params(
|
|
330
|
-
if
|
|
331
|
-
|
|
332
|
+
def paste_params(evt, checked_only=False):
|
|
333
|
+
if isinstance(evt.EventObject, (wx.TextEntry, stc.StyledTextCtrl)):
|
|
334
|
+
evt.Skip()
|
|
335
|
+
elif self.parameters:
|
|
336
|
+
self.paste_from_clipboard(checked_only)
|
|
332
337
|
|
|
333
|
-
def reset_params(
|
|
338
|
+
def reset_params(evt, checked_only=False):
|
|
334
339
|
self.Draw(None)
|
|
335
340
|
if self.parameters:
|
|
336
|
-
|
|
341
|
+
self.reset_params(checked_only)
|
|
337
342
|
|
|
338
343
|
self.handler.append({ # DNA<Layer>
|
|
339
344
|
None : {
|
|
@@ -356,15 +361,15 @@ class LayerInterface(CtrlInterface):
|
|
|
356
361
|
})
|
|
357
362
|
self.menu = [
|
|
358
363
|
(wx.ID_COPY, "&Copy params\t(C-c)", "Copy params",
|
|
359
|
-
lambda v: copy_params(checked_only=wx.GetKeyState(wx.WXK_SHIFT)),
|
|
364
|
+
lambda v: copy_params(v, checked_only=wx.GetKeyState(wx.WXK_SHIFT)),
|
|
360
365
|
lambda v: v.Enable(bool(self.parameters))),
|
|
361
366
|
|
|
362
367
|
(wx.ID_PASTE, "&Paste params\t(C-v)", "Read params",
|
|
363
|
-
lambda v: paste_params(checked_only=wx.GetKeyState(wx.WXK_SHIFT)),
|
|
368
|
+
lambda v: paste_params(v, checked_only=wx.GetKeyState(wx.WXK_SHIFT)),
|
|
364
369
|
lambda v: v.Enable(bool(self.parameters))),
|
|
365
370
|
(),
|
|
366
371
|
(wx.ID_RESET, "&Reset params\t(C-n)", "Reset params", Icon('-'),
|
|
367
|
-
lambda v: reset_params(checked_only=wx.GetKeyState(wx.WXK_SHIFT)),
|
|
372
|
+
lambda v: reset_params(v, checked_only=wx.GetKeyState(wx.WXK_SHIFT)),
|
|
368
373
|
lambda v: v.Enable(bool(self.parameters))),
|
|
369
374
|
(),
|
|
370
375
|
(wx.ID_EDIT, "&Edit module", "Edit module", Icon('pen'),
|
mwx/mgplt.py
CHANGED
|
@@ -139,7 +139,7 @@ class GnuplotFrame(mwx.Frame):
|
|
|
139
139
|
lambda v: self.panel.paste_from_clipboard()),
|
|
140
140
|
(),
|
|
141
141
|
(wx.ID_RESET, "&Reset params\tCtrl-n", "Reset params to ini-value",
|
|
142
|
-
lambda v: self.panel.
|
|
142
|
+
lambda v: self.panel.reset_params()),
|
|
143
143
|
]
|
|
144
144
|
self.menubar["Gnuplot"] = [
|
|
145
145
|
(mwx.ID_(80), "&Gnuplot setting\tCtrl-g", "Edit settings",
|
mwx/nutshell.py
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
from functools import wraps
|
|
5
5
|
from importlib import import_module
|
|
6
6
|
from contextlib import contextmanager
|
|
7
|
+
from pathlib import Path
|
|
7
8
|
from pprint import pformat
|
|
8
9
|
from bdb import BdbQuit
|
|
9
10
|
import traceback
|
|
@@ -220,21 +221,21 @@ class AutoCompInterfaceMixin:
|
|
|
220
221
|
if self.CallTipActive():
|
|
221
222
|
self.CallTipCancel()
|
|
222
223
|
|
|
223
|
-
text =
|
|
224
|
+
text = self.SelectedText or self.expr_at_caret or self.line_at_caret
|
|
224
225
|
if text:
|
|
225
226
|
text = introspect.getRoot(text, terminator='(')
|
|
226
227
|
try:
|
|
227
228
|
obj = self.eval(text)
|
|
228
229
|
self.help(obj)
|
|
229
230
|
except Exception as e:
|
|
230
|
-
self.message(
|
|
231
|
+
self.message(e)
|
|
231
232
|
|
|
232
233
|
def call_helpTip(self, evt):
|
|
233
234
|
"""Show a calltip for the selected function."""
|
|
234
235
|
if self.CallTipActive():
|
|
235
236
|
self.CallTipCancel()
|
|
236
237
|
|
|
237
|
-
text =
|
|
238
|
+
text = self.SelectedText or self.expr_at_caret or self.line_at_caret
|
|
238
239
|
if text:
|
|
239
240
|
p = self.cpos
|
|
240
241
|
self.autoCallTipShow(text,
|
|
@@ -1721,10 +1722,19 @@ class Buffer(EditorInterface, EditWindow):
|
|
|
1721
1722
|
return self.__filename
|
|
1722
1723
|
|
|
1723
1724
|
def update_filestamp(self, fn):
|
|
1724
|
-
|
|
1725
|
-
|
|
1725
|
+
self.__path = Path(fn)
|
|
1726
|
+
if self.__path.is_file():
|
|
1727
|
+
self.__mtime = self.__path.stat().st_mtime # update timestamp (modified time)
|
|
1726
1728
|
else:
|
|
1727
|
-
|
|
1729
|
+
if re.match(url_re, fn):
|
|
1730
|
+
self.__mtime = -1
|
|
1731
|
+
else:
|
|
1732
|
+
try:
|
|
1733
|
+
self.__path.resolve(True) # Check if the path format is valid.
|
|
1734
|
+
except FileNotFoundError:
|
|
1735
|
+
self.__mtime = False
|
|
1736
|
+
except Exception:
|
|
1737
|
+
self.__mtime = None
|
|
1728
1738
|
if self.__filename != fn:
|
|
1729
1739
|
self.__filename = fn
|
|
1730
1740
|
self.update_caption()
|
|
@@ -1735,16 +1745,30 @@ class Buffer(EditorInterface, EditWindow):
|
|
|
1735
1745
|
|
|
1736
1746
|
Returns:
|
|
1737
1747
|
None : no file
|
|
1738
|
-
= 0 : a file
|
|
1748
|
+
= 0 : a file (even if not found)
|
|
1739
1749
|
> 0 : a file edited externally
|
|
1740
1750
|
< 0 : a url file
|
|
1741
1751
|
"""
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1752
|
+
try:
|
|
1753
|
+
return self.__path.stat().st_mtime - self.__mtime
|
|
1754
|
+
except Exception:
|
|
1755
|
+
if isinstance(self.__mtime, float): # path not resolved.
|
|
1756
|
+
self.__mtime = False
|
|
1757
|
+
return self.__mtime
|
|
1758
|
+
|
|
1759
|
+
@property
|
|
1760
|
+
def need_buffer_save(self):
|
|
1761
|
+
"""Returns whether the buffer should be saved.
|
|
1762
|
+
The file has been modified internally.
|
|
1763
|
+
"""
|
|
1764
|
+
return self.mtdelta is not None and self.IsModified()
|
|
1765
|
+
|
|
1766
|
+
@property
|
|
1767
|
+
def need_buffer_load(self):
|
|
1768
|
+
"""Returns whether the buffer should be loaded.
|
|
1769
|
+
The file has been modified externally.
|
|
1770
|
+
"""
|
|
1771
|
+
return self.mtdelta is not None and self.mtdelta > 0
|
|
1748
1772
|
|
|
1749
1773
|
@property
|
|
1750
1774
|
def caption_prefix(self):
|
|
@@ -1769,20 +1793,6 @@ class Buffer(EditorInterface, EditWindow):
|
|
|
1769
1793
|
except AttributeError:
|
|
1770
1794
|
pass
|
|
1771
1795
|
|
|
1772
|
-
@property
|
|
1773
|
-
def need_buffer_save(self):
|
|
1774
|
-
"""Returns whether the buffer should be saved.
|
|
1775
|
-
The file has been modified internally.
|
|
1776
|
-
"""
|
|
1777
|
-
return self.mtdelta is not None and self.IsModified()
|
|
1778
|
-
|
|
1779
|
-
@property
|
|
1780
|
-
def need_buffer_load(self):
|
|
1781
|
-
"""Returns whether the buffer should be loaded.
|
|
1782
|
-
The file has been modified externally.
|
|
1783
|
-
"""
|
|
1784
|
-
return self.mtdelta is not None and self.mtdelta > 0
|
|
1785
|
-
|
|
1786
1796
|
def __init__(self, parent, filename, **kwargs):
|
|
1787
1797
|
EditWindow.__init__(self, parent, **kwargs)
|
|
1788
1798
|
EditorInterface.__init__(self)
|
|
@@ -2083,34 +2093,21 @@ class Buffer(EditorInterface, EditWindow):
|
|
|
2083
2093
|
dispatcher.send(signal='Interpreter.push',
|
|
2084
2094
|
sender=self, command=None, more=False)
|
|
2085
2095
|
|
|
2086
|
-
def gen_text_at_caret(self):
|
|
2087
|
-
"""Generates the selected text,
|
|
2088
|
-
otherwise the line or expression at the caret.
|
|
2089
|
-
"""
|
|
2090
|
-
def _gen_text():
|
|
2091
|
-
text = self.SelectedText
|
|
2092
|
-
if text:
|
|
2093
|
-
yield text
|
|
2094
|
-
else:
|
|
2095
|
-
yield self.line_at_caret
|
|
2096
|
-
yield self.expr_at_caret
|
|
2097
|
-
return filter(None, _gen_text())
|
|
2098
|
-
|
|
2099
2096
|
def eval_line(self):
|
|
2100
2097
|
if self.CallTipActive():
|
|
2101
2098
|
self.CallTipCancel()
|
|
2102
2099
|
|
|
2103
|
-
|
|
2104
|
-
|
|
2100
|
+
text = self.SelectedText or self.expr_at_caret
|
|
2101
|
+
if text:
|
|
2105
2102
|
try:
|
|
2106
2103
|
obj = eval(text, self.globals, self.locals)
|
|
2107
2104
|
except Exception as e:
|
|
2108
|
-
|
|
2105
|
+
self.message(e)
|
|
2109
2106
|
else:
|
|
2110
2107
|
self.CallTipShow(self.cpos, pformat(obj))
|
|
2111
2108
|
self.message(text)
|
|
2112
|
-
|
|
2113
|
-
|
|
2109
|
+
else:
|
|
2110
|
+
self.message("No words")
|
|
2114
2111
|
|
|
2115
2112
|
def exec_region(self):
|
|
2116
2113
|
try:
|
|
@@ -2425,8 +2422,8 @@ class EditorBook(AuiNotebook, CtrlInterface):
|
|
|
2425
2422
|
self.swap_buffer(buf, lineno)
|
|
2426
2423
|
return True
|
|
2427
2424
|
return False
|
|
2428
|
-
except OSError as e:
|
|
2429
|
-
self.post_message(e)
|
|
2425
|
+
except (OSError, UnicodeDecodeError) as e:
|
|
2426
|
+
self.post_message("Failed to load:", e)
|
|
2430
2427
|
self.delete_buffer(buf)
|
|
2431
2428
|
return False
|
|
2432
2429
|
|
|
@@ -2441,11 +2438,10 @@ class EditorBook(AuiNotebook, CtrlInterface):
|
|
|
2441
2438
|
for fn in dlg.Paths:
|
|
2442
2439
|
self.find_file(fn)
|
|
2443
2440
|
return
|
|
2444
|
-
if self.load_file(filename) == False: # not None
|
|
2441
|
+
if self.load_file(filename) == False: # noqa: not None
|
|
2445
2442
|
buf = self.create_buffer(filename)
|
|
2446
|
-
buf._Buffer__mtime = 0 # => need_buffer_save
|
|
2447
2443
|
self.swap_buffer(buf)
|
|
2448
|
-
self.post_message(
|
|
2444
|
+
self.post_message("New file.")
|
|
2449
2445
|
|
|
2450
2446
|
def save_file(self, filename, buf=None, verbose=True):
|
|
2451
2447
|
"""Save the current buffer to a file.
|
|
@@ -2467,8 +2463,8 @@ class EditorBook(AuiNotebook, CtrlInterface):
|
|
|
2467
2463
|
self.default_buffer = None
|
|
2468
2464
|
return True
|
|
2469
2465
|
return False
|
|
2470
|
-
except
|
|
2471
|
-
self.post_message(
|
|
2466
|
+
except (OSError, UnicodeDecodeError) as e:
|
|
2467
|
+
self.post_message("Failed to save:", e)
|
|
2472
2468
|
return False
|
|
2473
2469
|
|
|
2474
2470
|
def load_buffer(self, buf=None):
|
|
@@ -3592,39 +3588,25 @@ class Nautilus(EditorInterface, Shell):
|
|
|
3592
3588
|
self.cpos, self.anchor = self.anchor, self.cpos
|
|
3593
3589
|
self.EnsureCaretVisible()
|
|
3594
3590
|
|
|
3595
|
-
def gen_text_at_caret(self):
|
|
3596
|
-
"""Generates the selected text,
|
|
3597
|
-
otherwise the line or expression at the caret.
|
|
3598
|
-
(override) Generates command line (that starts with a prompt).
|
|
3599
|
-
"""
|
|
3600
|
-
def _gen_text():
|
|
3601
|
-
text = self.SelectedText
|
|
3602
|
-
if text:
|
|
3603
|
-
yield text
|
|
3604
|
-
else:
|
|
3605
|
-
yield self.getCommand() # self.line_at_caret
|
|
3606
|
-
yield self.expr_at_caret
|
|
3607
|
-
return filter(None, _gen_text())
|
|
3608
|
-
|
|
3609
3591
|
def eval_line(self, evt):
|
|
3610
3592
|
"""Evaluate the selected word or line."""
|
|
3611
3593
|
if self.CallTipActive():
|
|
3612
3594
|
self.CallTipCancel()
|
|
3613
3595
|
|
|
3614
|
-
|
|
3615
|
-
|
|
3596
|
+
text = self.SelectedText or self.expr_at_caret
|
|
3597
|
+
if text:
|
|
3616
3598
|
tokens = split_words(text)
|
|
3617
3599
|
try:
|
|
3618
3600
|
cmd = self.magic_interpret(tokens)
|
|
3619
3601
|
cmd = self.regulate_cmd(cmd)
|
|
3620
3602
|
obj = self.eval(cmd)
|
|
3621
3603
|
except Exception as e:
|
|
3622
|
-
|
|
3604
|
+
self.message(e)
|
|
3623
3605
|
else:
|
|
3624
3606
|
self.CallTipShow(self.cpos, pformat(obj))
|
|
3625
3607
|
self.message(cmd)
|
|
3626
|
-
|
|
3627
|
-
|
|
3608
|
+
else:
|
|
3609
|
+
self.message("No words")
|
|
3628
3610
|
|
|
3629
3611
|
def exec_region(self, evt):
|
|
3630
3612
|
"""Execute the the selected region."""
|
mwx/plugins/ffmpeg_view.py
CHANGED
|
@@ -10,7 +10,7 @@ import wx.media
|
|
|
10
10
|
|
|
11
11
|
from mwx.framework import _F, hotkey
|
|
12
12
|
from mwx.graphman import Layer
|
|
13
|
-
from mwx.controls import LParam, Icon, Button,
|
|
13
|
+
from mwx.controls import LParam, Icon, Button, TextBox
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
def read_info(path):
|
|
@@ -101,7 +101,7 @@ class Plugin(Layer):
|
|
|
101
101
|
handler=self.set_offset,
|
|
102
102
|
updater=self.get_offset,
|
|
103
103
|
)
|
|
104
|
-
self.crop =
|
|
104
|
+
self.crop = TextBox(self, icon="cut", size=(130,-1),
|
|
105
105
|
handler=self.set_crop,
|
|
106
106
|
updater=self.get_crop,
|
|
107
107
|
)
|
|
@@ -210,20 +210,18 @@ class Plugin(Layer):
|
|
|
210
210
|
|
|
211
211
|
def set_offset(self, tc):
|
|
212
212
|
"""Set offset value by referring to ss/to value."""
|
|
213
|
-
|
|
213
|
+
if self._path:
|
|
214
214
|
self.mc.Seek(self.DELTA + int(tc.value * 1000))
|
|
215
|
-
except Exception:
|
|
216
|
-
pass
|
|
217
215
|
|
|
218
216
|
def get_offset(self, tc):
|
|
219
217
|
"""Get offset value and assigns it to ss/to value."""
|
|
220
|
-
|
|
218
|
+
if self._path:
|
|
221
219
|
tc.value = round(self.mc.Tell()) / 1000
|
|
222
|
-
except Exception:
|
|
223
|
-
pass
|
|
224
220
|
|
|
225
221
|
def set_crop(self):
|
|
226
222
|
"""Set crop area (W:H:Left:Top) to roi."""
|
|
223
|
+
if not self._path:
|
|
224
|
+
return
|
|
227
225
|
frame = self.graph.frame
|
|
228
226
|
if frame:
|
|
229
227
|
try:
|
|
@@ -238,6 +236,8 @@ class Plugin(Layer):
|
|
|
238
236
|
|
|
239
237
|
def get_crop(self):
|
|
240
238
|
"""Get crop area (W:H:Left:Top) from roi."""
|
|
239
|
+
if not self._path:
|
|
240
|
+
return
|
|
241
241
|
crop = ''
|
|
242
242
|
frame = self.graph.frame
|
|
243
243
|
if frame:
|
|
@@ -246,28 +246,24 @@ class Plugin(Layer):
|
|
|
246
246
|
xo, yo = nx[0], ny[1]
|
|
247
247
|
xp, yp = nx[1], ny[0]
|
|
248
248
|
crop = "{}:{}:{}:{}".format(xp-xo, yp-yo, xo, yo)
|
|
249
|
-
if
|
|
249
|
+
if not crop:
|
|
250
250
|
crop = "{}:{}:0:0".format(*self.video_size)
|
|
251
251
|
self.crop.Value = crop
|
|
252
252
|
|
|
253
253
|
def seekto(self, offset):
|
|
254
254
|
"""Seek position with offset [ms] from the `to` position."""
|
|
255
|
-
|
|
255
|
+
if self._path:
|
|
256
256
|
t = self.to.value + offset/1000
|
|
257
257
|
if 0 <= t < self.video_dur:
|
|
258
258
|
self.to.value = round(t, 3)
|
|
259
259
|
self.set_offset(self.to)
|
|
260
|
-
except AttributeError:
|
|
261
|
-
pass
|
|
262
260
|
|
|
263
261
|
def seekd(self, offset):
|
|
264
262
|
"""Seek position with offset [ms] from the current position."""
|
|
265
|
-
|
|
263
|
+
if self._path:
|
|
266
264
|
t = self.mc.Tell() + offset
|
|
267
265
|
if 0 <= t < self.video_dur * 1000:
|
|
268
266
|
self.mc.Seek(self.DELTA + t)
|
|
269
|
-
except AttributeError:
|
|
270
|
-
pass
|
|
271
267
|
|
|
272
268
|
def snapshot(self):
|
|
273
269
|
"""Create a snapshot of the current frame.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
mwx/__init__.py,sha256=
|
|
1
|
+
mwx/__init__.py,sha256=pS7ZG8QKRypiFFiaWAq_opBB6I_1viZ0zUMk2TbjzE0,667
|
|
2
2
|
mwx/bookshelf.py,sha256=b_TMDaNIzLHoL0xbbqb3tt0BnRvhLAqaCn_pBdrigZw,7523
|
|
3
|
-
mwx/controls.py,sha256=
|
|
4
|
-
mwx/framework.py,sha256=
|
|
5
|
-
mwx/graphman.py,sha256=
|
|
3
|
+
mwx/controls.py,sha256=X4zx2h6oggUsQxi2PRk4RUsJieYTmcAPIvWwaz-ysTI,48107
|
|
4
|
+
mwx/framework.py,sha256=8QHKtncqf_ip6BkcVA9CFttFFsjw4EgxEkT9efltECg,76125
|
|
5
|
+
mwx/graphman.py,sha256=RqD0W9I2BvJ3Q2kyMiyyg4n-T4-_x7PDuCI5bGAg5k4,70110
|
|
6
6
|
mwx/images.py,sha256=oxCn0P-emiWujSS2gUgU5TUnr5cPjix2jBcjOBDr24I,48701
|
|
7
7
|
mwx/matplot2.py,sha256=RuVWXC2A_qgZRNmBBptbHDn5MyxaWBqp3ru4bP_lDE0,33150
|
|
8
8
|
mwx/matplot2g.py,sha256=dBAODQvSM_yf2uQUCrRO03ZOK3MycR8lEXTJfRXDlbY,64432
|
|
9
9
|
mwx/matplot2lg.py,sha256=JRWjWnLJUytbSq6wxs4P0gbVUr3xoLSF6Wwqd5V_pJI,27404
|
|
10
|
-
mwx/mgplt.py,sha256=
|
|
11
|
-
mwx/nutshell.py,sha256=
|
|
10
|
+
mwx/mgplt.py,sha256=8mXbHpCmm7lz3XbAxOg7IVC7DaSGBEby1UfTlMl9kjk,5604
|
|
11
|
+
mwx/nutshell.py,sha256=qPMOa4froZAhslacI2Oz_Xhe99zU6ucgh42zwe3sKxQ,140838
|
|
12
12
|
mwx/testsuite.py,sha256=kiM3-BVhr42LRRN7xG7pYl3at8o2vnypWSxD8KRvA7c,1228
|
|
13
13
|
mwx/utilus.py,sha256=HFvP682SyeSp8yNfUrdUXPhWdLuWVlsUSg6LqNBJOT8,37451
|
|
14
14
|
mwx/wxmon.py,sha256=yzWqrbY6LzpfRwQeytYUeqFhFuLVm_XEvrVAL_k0HBQ,12756
|
|
@@ -16,14 +16,14 @@ mwx/wxpdb.py,sha256=AObuf4JLAmlQLj-yf0_mkBBd-Bhhz2Vb8hbTVcHEZOs,18875
|
|
|
16
16
|
mwx/wxwil.py,sha256=hhyB1lPrF9ixeObxCOKQv0Theu-B-kpJg_yVU3EGSNg,5406
|
|
17
17
|
mwx/wxwit.py,sha256=1hHtMi2YEy2T_LnUpwdmrIdtCuvxMOFyykqnbq6jLP0,7294
|
|
18
18
|
mwx/plugins/__init__.py,sha256=jnJ-Sl9XJ_7BFDslD_r7dsbxsOT57q_IaEriV53XIGY,41
|
|
19
|
-
mwx/plugins/ffmpeg_view.py,sha256=
|
|
19
|
+
mwx/plugins/ffmpeg_view.py,sha256=NIHFJLPeliOXH3ke0NvQzYBhY0oeEP6dgZQofB5Ry1c,11031
|
|
20
20
|
mwx/plugins/fft_view.py,sha256=08A_Y73XirV7kXpwf-v0mUA0Hr0MOfdMXv3tvL1hvWA,2789
|
|
21
21
|
mwx/plugins/frame_listview.py,sha256=gowjQ-ARNonMkDSXkQgPKq4U9YBJ-vQ0jK2krBVOdCs,10420
|
|
22
22
|
mwx/plugins/line_profile.py,sha256=zzm6_7lnAnNepLbh07ordp3nRWDFQJtu719ZVjrVf8s,819
|
|
23
23
|
mwx/py/__init__.py,sha256=xykgfOytOwNuvXsfkLoumFZSTN-iBsHOjczYXngjmUE,12
|
|
24
24
|
mwx/py/filling.py,sha256=fumUG1F5M9TL-Dfqni4G85uk7TmvnUunTbdcPDV0vfo,16857
|
|
25
|
-
mwxlib-1.
|
|
26
|
-
mwxlib-1.
|
|
27
|
-
mwxlib-1.
|
|
28
|
-
mwxlib-1.
|
|
29
|
-
mwxlib-1.
|
|
25
|
+
mwxlib-1.2.0.dist-info/LICENSE,sha256=PGtRKCaTkmUDlBQwpptJAxJtdqxIUtAmdBsaT9nUVkA,1091
|
|
26
|
+
mwxlib-1.2.0.dist-info/METADATA,sha256=0hdCtq1FWS8gy0i8hVk3Yslu0L7fmOp9ZBoxc0QVIlQ,7258
|
|
27
|
+
mwxlib-1.2.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
28
|
+
mwxlib-1.2.0.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
|
|
29
|
+
mwxlib-1.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|