Commit f6b73523 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz

python: update some incorrect or obsolete code

* tests/python/ipnbdoctest.py: Use importlib instead of imp.
* tests/python/ltlparse.py: Fix invalid escape sequence.
parent f6e6099d
...@@ -22,9 +22,9 @@ except ImportError: ...@@ -22,9 +22,9 @@ except ImportError:
print('Python 3.x is needed to run this script.') print('Python 3.x is needed to run this script.')
sys.exit(77) sys.exit(77)
import imp import importlib
try: try:
imp.find_module('IPython') importlib.util.find_spec('IPython')
except: except:
print('IPython is needed to run this script.') print('IPython is needed to run this script.')
sys.exit(77) sys.exit(77)
......
...@@ -25,7 +25,7 @@ import spot ...@@ -25,7 +25,7 @@ import spot
e = spot.default_environment.instance() e = spot.default_environment.instance()
l = ['GFa', 'a U (((b)) xor c)', '!(FFx <=> Fx)', 'a \/ a \/ b \/ a \/ a']; l = ['GFa', 'a U (((b)) xor c)', '!(FFx <=> Fx)', 'a \\/ a \\/ b \\/ a \\/ a']
for str1 in l: for str1 in l:
pf = spot.parse_infix_psl(str1, e, False) pf = spot.parse_infix_psl(str1, e, False)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment