Is there a way to import math build in module if there is another module with the same name? I can't change the name of this other 'math' module or delete it.
Asked
Active
Viewed 154 times
0
-
3http://stackoverflow.com/questions/1900189/how-to-access-a-standard-library-module-in-python-when-there-is-a-local-module-w – DhruvPathak Sep 11 '13 at 11:12
-
Why is there another math module? That's just going to cause all sorts of confusion. – Teepeemm Sep 11 '13 at 13:47
-
Thanks DhruvPathak, its working ! I just came into this project, and this module was already here, can't change it :') – MObject Sep 11 '13 at 15:34
1 Answers
1
You can import modules under a different name in Python:
import math as my_math

jbaiter
- 6,913
- 4
- 30
- 40