Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tammo Jan Dijkema
HPIB
Commits
7ce7777f
Commit
7ce7777f
authored
Feb 16, 2018
by
auke.klazema
Browse files
renamed parameters
parent
4a2e6c82
Changes
1
Hide whitespace changes
Inline
Side-by-side
hpib.py
View file @
7ce7777f
...
...
@@ -57,15 +57,15 @@ class PrologixGpibUsb(PortDevice):
if
not
self
.
_rematch
:
raise
ValueError
(
port
)
def
_find_available_port
(
self
,
max
D
evice
N
um
,
port
,
port
F
ormat
,
timeout
,
verbose
):
while
int
(
self
.
_rematch
.
group
(
2
))
<
max
D
evice
N
um
:
def
_find_available_port
(
self
,
max
_d
evice
_n
um
,
port
,
port
_f
ormat
,
timeout
,
verbose
):
while
int
(
self
.
_rematch
.
group
(
2
))
<
max
_d
evice
_n
um
:
if
verbose
:
print
"trying "
,
port
try
:
self
.
_serialPort
=
serial
.
Serial
(
port
,
timeout
=
timeout
)
break
except
serial
.
SerialException
:
port
=
self
.
_rematch
.
group
(
1
)
+
(
port
F
ormat
%
(
int
(
self
.
_rematch
.
group
(
2
))
+
1
))
port
=
self
.
_rematch
.
group
(
1
)
+
(
port
_f
ormat
%
(
int
(
self
.
_rematch
.
group
(
2
))
+
1
))
self
.
_rematch
=
re
.
search
(
"(/dev/tty.*[^0-9])([0-9]+$)"
,
port
)
if
self
.
_serialPort
is
None
:
raise
serial
.
SerialException
(
"Cannot find port"
)
...
...
Write
Preview
Supports
Markdown
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