> Branch: refs/heads/master
> Home: https://github.com/Starlink/starlink
> Commit: 042c1bf6a194d89f951ceb657967ddca65355783
> https://github.com/Starlink/starlink/commit/042c1bf6a194d89f951ceb657967ddca65355783
> Author: Graham Bell <[log in to unmask]>
> Date: 2013-01-24 (Thu, 24 Jan 2013)
>
> Changed paths:
> A applications/smurf/scripts/dumpmakemapcfg
>
> Log Message:
> -----------
> smurf: Add initial version of dumpmakemapcfg.
>
> This script is supposed to print out the MAKEMAP configuration
> as extracted from the HISTORY in an NDF file.
>
> This version uses starlink-pyndf and starutil.py.
Hello,
This script works properly with Python 3, but I seem to be having problems
with starlink-pyndf under Python 2 (version 2.7.3).
If I take out the loc.annul() (line 63), then it also works on Python 2.
With the annul in place, however, it carries on past the part which reads
the file, and fails to prepare a regular expression:
Traceback (most recent call last):
File "./dumpmakemapcfg", line 191, in <module>
main()
File "./dumpmakemapcfg", line 45, in main
groups = extract_history_groups(text)
File "./dumpmakemapcfg", line 103, in extract_history_groups
group = re.compile('Group:')
File "/local/python/lib/python2.7/re.py", line 190, in compile
return _compile(pattern, flags)
File "/local/python/lib/python2.7/re.py", line 240, in _compile
p = sre_compile.compile(pattern, flags)
File "/local/python/lib/python2.7/sre_compile.py", line 504, in compile
code = _code(p, flags)
File "/local/python/lib/python2.7/sre_compile.py", line 486, in _code
_compile_info(code, p, flags)
File "/local/python/lib/python2.7/sre_compile.py", line 365, in
_compile_info
lo, hi = pattern.getwidth()
File "/local/python/lib/python2.7/sre_parse.py", line 147, in getwidth
for op, av in self.data:
TypeError: PyCObject_AsVoidPtr called with null pointer
The alternative would be to run KAPPA HISLIST and avoid the requirement
for starlink-pyndf.
Best regards,
Graham
|