On 8/10/19 3:45 PM, jf...@ms4.hinet.net wrote:
For example:
from my-dir import test

I know it can be solved by renaming, but any alternative?


The manual is your friend:
- import
- importlib

(the latter allows modules to be identified by strings)

However, Pythons has naming rules. If you try to get around them, sooner or later you'll 'forget' and trip yourself up. Recommend your first idea!
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to