-
That code snippet should read:
import visa
# it happens to be first in the list
i=visa.instrument(visa.get_instruments_list()[0],send_end=None,term_chars=None)
print i.ask("*IDN?")
2008-10-09 13:05:08 UTC in Python VISA -- control GPIB, USB, Serial
-
File Added: pyvisa-passport.patch.
2008-10-09 13:04:32 UTC in Python VISA -- control GPIB, USB, Serial
-
I have a Rhode&Schwarz NRP-Z21 power meter, for which a passport driver exists to make it work with VISA. Unfortunately, PyVISA assumes it can set several attributes that are not supported by this driver.
Attached is a patch with three changes:
- in visa.__set_term_chars() do not fail when trying to
clear VI_ATTR_TERMCHAR_EN in the case that
term_chars=None
- in...
2008-10-09 13:03:49 UTC in Python VISA -- control GPIB, USB, Serial
-
Logged In: YES
user_id=555155
This problem is actually more widespread than previously
indicated. Not only do all calls to self.error where that
function returns need to cope with that, and recover (the
HTMLParser defines that every character in the input will be
visited exactly once), but other modules are also affected.
In particular, feeding HTML (from spam) with a tag
into...
2004-04-03 18:04:36 UTC in Python
-
Allows HTMLParser to continue after invoking error().
Normally, error() raises an HTMLParseError, but a user
might want to override that behaviour and continue parsing.
Places following calls to self.error() need some
recovery code.
2004-03-16 09:59:50 UTC in Python
-
Logged In: YES
user_id=555155
Fixed by my patch against 2.3.3.
The patch adds recovery to ensure progress and tries to not
miss any data in the input.
The error() method is now commented as being overridable,
just def error(): pass to ignore any parsing errors.
2004-03-16 09:53:15 UTC in Python