Closed hectorpal closed 5 years ago
Hi @hectorpal,
Looking back at the code, this was actually the intended behavior.
The templates
package is optional, so to use it one needs to import it explicitly:
import pymzn.templates
pymzn.templates.add_package('pyconstruct.domains', 'share')
I fixed this issue in https://github.com/unitn-sml/pyconstruct/commit/674feb5dd17946e8d519057d341491406c3dbf81.
When attempting to use pyconstruct, the following line failed
pymzn.templates.add_package('pyconstruct.domains', 'share')
with errorAttributeError: module 'pymzn' has no attribute 'templates
It seems
from .templates import *
is missing from this filehttps://github.com/paolodragone/pymzn/blob/master/pymzn/__init__.py
It might have gone missing in this commit: https://github.com/paolodragone/pymzn/commit/df5aca6a5d7523ad54bbb37e208c5590487359f1#diff-21aa6139d6400b1aa70e461a45c6cf63