python - PyCharm module name conflicts -


I have a module called 'io' in the package: mypackage.io This is the underlying Python The cause of a dispute with the IO package. Thus, whenever I use PyCharm to debug my code, because pydev helper uses gzip (which uses IO IO), I get an ImportError module. This problem automatically partly connects my package path to the interpreter path due to PyCharm. So I have been left with two options.

  • It seems that I need to make changes in gzip.py so that IO import through full import.
  • Replace my module with io some_allo name

    Have I lost a better solution?

    You basically have two options:

    1. Change the name of the package
    2. Use mypackage.io.foo instead of Io.foo

      Generally, your bad form is a custom above an underlying hardware To map the package, unless you deliberately do not change the behavior of that default biltine, any short-term game will be offset by many, long-term headaches. .

Comments