Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.io.stream
Commits
1c40396f
Commit
1c40396f
authored
Sep 20, 2020
by
David GEISSBUHLER
Browse files
save filter
parent
30da29ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
bob/io/stream/stream.py
View file @
1c40396f
...
...
@@ -425,4 +425,19 @@ class StreamAdjust(StreamFilter):
print
(
new_indices
)
print
(
self
.
parent
.
timestamps
)
print
(
self
.
adjust_to
.
timestamps
)
return
super
().
load
(
new_indices
)
\ No newline at end of file
return
super
().
load
(
new_indices
)
################################################################################
### save ###
@
stream_filter
(
"save"
)
class
StreamAdjust
(
StreamFilter
):
def
__init__
(
self
,
file
,
name
,
parent
):
super
().
__init__
(
name
=
name
,
parent
=
parent
)
self
.
file
=
file
def
put
(
self
,
data
,
timestamp
=
None
):
if
self
.
file
is
not
None
and
isinstance
(
file
,
StreamFile
):
self
.
file
.
put_frame
(
self
.
name
,
data
)
else
:
raise
(
Exception
(
'save: file is not defined'
))
return
data
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment