Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pycomsdk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
com
pycomsdk
Commits
70c91ee9
Commit
70c91ee9
authored
5 years ago
by
Savva Golubitsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
multiple connections with order
parent
e3d05036
master
dev
dev_parser_aDOT
golubevvo
pars
1 merge request
!1
Парсер aDOT формата в рамках pycomsdk
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
parser.cpython-37.pyc
comsdk/__pycache__/parser.cpython-37.pyc
+0
-0
parser.py
comsdk/parser.py
+13
-6
No files found.
comsdk/__pycache__/parser.cpython-37.pyc
View file @
70c91ee9
No preview for this file type
This diff is collapsed.
Click to expand it.
comsdk/parser.py
View file @
70c91ee9
...
@@ -127,16 +127,23 @@ class Parser():
...
@@ -127,16 +127,23 @@ class Parser():
exit
(
-
1
)
exit
(
-
1
)
def
_split_multiple
(
self
,
param
):
def
_split_multiple
(
self
,
param
):
res
=
[]
vals
=
{}
first
=
True
first
=
True
for
s
in
param
.
__slots__
:
for
s
in
param
.
__slots__
:
attr
=
getattr
(
param
,
s
)
attr
=
getattr
(
param
,
s
)
if
attr
is
not
None
and
'
\0
'
in
attr
:
if
attr
is
not
None
and
'
\0
'
in
attr
:
vals
=
attr
.
split
(
'
\0
'
)
vals
[
s
]
=
attr
.
split
(
'
\0
'
)
for
v
in
vals
:
l
=
0
par
=
copy
.
copy
(
param
)
for
sl
in
vals
:
setattr
(
par
,
s
,
v
)
if
l
==
0
:
res
.
append
(
par
)
l
=
len
(
vals
[
sl
])
elif
l
!=
len
(
vals
[
sl
]):
print
(
"
\t
ERROR: Number of multiple params do not match"
,
l
)
return
-
1
res
=
[
copy
.
copy
(
param
)
for
i
in
range
(
l
)]
for
sl
in
vals
:
for
i
,
_
in
enumerate
(
res
):
setattr
(
res
[
i
],
sl
,
vals
[
sl
][
i
])
return
res
return
res
#Props is line "[proFp=smth, ...]"
#Props is line "[proFp=smth, ...]"
...
...
This diff is collapsed.
Click to expand it.
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