Closed m-macaskill closed 6 years ago
Hello,
Thanks for the report.
The problem is mainly when the user doesn't install the dependencies properly, this package depends on configparser
and future
, and the error you might get for configparser
is when you don't install the linked configparser
module, to fix that you just need to do pip install configparser
.
Since you've declared arabic_reshaper
as a dependency in psychopy
then pip
will install the dependencies properly, so the problem is with people who are not using pip
or setuptools
to install your module.
As for the import in my code, I just follow this sheet.
Regards.
Hi Abdullah,
python-arabic-reshaper
is now a valuable dependency in thePsychoPy
project https://github.com/psychopy/psychopy, many thanks for your work.Some (but oddly, not all) of our Python 2 users are reporting an import issue though:
I can't replicate this myself but the import of this particular library does seem to be used as a classic example for maintaining compatibility between Python 2 and 3 code. Some suggestions include first attempting to import the Python 3 module name and if that fails, fall back on the Python 2 name (http://python3porting.com/noconv.html):
but a more specific example gives this (https://stackoverflow.com/questions/32507715/standard-solution-for-supporting-python-2-and-python-3):
which might be more useful here maybe.
Any chance of incorporating something like this into
arabic_reshaper
? I'm not keen on submitting a pull request myself, as not being able to replicate the name conflict issue, I wouldn't be able to test it properly.