2

Suppose I have developed a third library named foo first, and then a new standard library also named foo is added into Python. Can I still use my version of foo without bothering to change its name?

Any solutions or suggestions?

RussellLuo
  • 155
  • 2
  • 9
  • http://stackoverflow.com/questions/6031584/python-importing-from-builtin-library-when-module-with-same-name-exists – Vinay Jain Nov 08 '14 at 03:37
  • Thank you! But `foo` is a third library (need to be installed), not a module, any suggestions with this situation? – RussellLuo Nov 08 '14 at 03:47
  • 1
    You should rename your module, so that 1. You and anyone else using it doesn't have to jump through hoops to do so and 2. You can use the (presumably related!) functionality that Python is providing. – jonrsharpe Nov 08 '14 at 08:49
  • Maybe you are right. But I think the import mechanism of Python, in which all libraries are located in one namespace, is not good enough. Thank you anyway! – RussellLuo Nov 09 '14 at 01:24

0 Answers0