Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LabComm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anders Blomdell
LabComm
Commits
a6eda524
Commit
a6eda524
authored
11 years ago
by
Sven Gestegård Robertz
Browse files
Options
Downloads
Patches
Plain Diff
fixed python encoding example for multiple labcomm versions
parent
50540219
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/simple/example_encoder.py
+2
-1
2 additions, 1 deletion
examples/simple/example_encoder.py
examples/simple/run.sh
+4
-0
4 additions, 0 deletions
examples/simple/run.sh
lib/python/labcomm/LabComm.py
+1
-1
1 addition, 1 deletion
lib/python/labcomm/LabComm.py
with
7 additions
and
2 deletions
examples/simple/example_encoder.py
+
2
−
1
View file @
a6eda524
...
...
@@ -5,7 +5,8 @@ import sys
import
simple
if
__name__
==
'
__main__
'
:
encoder
=
labcomm
.
Encoder
(
labcomm
.
StreamWriter
(
open
(
sys
.
argv
[
1
],
'
w
'
)))
version
=
sys
.
argv
[
2
]
if
len
(
sys
.
argv
)
==
3
else
"
LabComm2013
"
encoder
=
labcomm
.
Encoder
(
labcomm
.
StreamWriter
(
open
(
sys
.
argv
[
1
],
'
w
'
)),
version
)
encoder
.
add_decl
(
simple
.
theTwoInts
.
signature
)
encoder
.
add_decl
(
simple
.
IntString
.
signature
)
foo
=
simple
.
theTwoInts
()
...
...
This diff is collapsed.
Click to expand it.
examples/simple/run.sh
+
4
−
0
View file @
a6eda524
...
...
@@ -25,6 +25,10 @@ echo
java
-cp
.:../../lib/java:gen06 Encoder06 encoded_data06
./example_decoder06 encoded_data06
PYTHONPATH
=
../../lib/python:gen ./example_encoder.py encoded_data06 LabComm2006
java
-cp
.:../../lib/java:gen06 Decoder06 encoded_data06
./example_encoder06 encoded_data06
java
-cp
.:../../lib/java:gen06 Decoder06 encoded_data06
...
...
This diff is collapsed.
Click to expand it.
lib/python/labcomm/LabComm.py
+
1
−
1
View file @
a6eda524
...
...
@@ -556,7 +556,7 @@ class Encoder(Codec):
def
__init__
(
self
,
writer
,
version
=
"
LabComm2013
"
):
super
(
Encoder
,
self
).
__init__
()
self
.
writer
=
writer
self
.
vers
o
in
=
version
self
.
versi
o
n
=
version
self
.
writer
.
start
(
self
,
self
.
version
)
def
pack
(
self
,
format
,
*
args
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment