Newbie question - Advanced math functions available under Windows?
theaney at cablespeed.com
Sat Jul 3 00:59:13 CEST 2004
The Toad <the.toad at trashcanistan.ca> writes:
> The math module documentation says that these math functions are "thin
> wrapers" around the platform C library funtions. This seems to assume
> a Unix/Linux system platform.
> Does this mean that math functions like sqrt(), etc. are not available
> in Python when running on Windows based systems? Thanks in advance.
No, you just need to import the math module.
>>> import math
If you want, you can import sqrt into your namespace
>>> from math import sqrt
Often, you see people import everything from a module into their
namespace with an asterisk
>>> from math import *
I hope this helps,
More information about the Python-list