# math.py

**URL:** <https://forum.ansible.com/t/math-py/17561>\
**Category:** Ansible Developer\
**Created:** [February 19, 2015, 12:50am UTC](https://forum.ansible.com/t/math-py/17561 "2015-02-19T00:50:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mick\_Bass](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@Mick\_Bass](https://forum.ansible.com/u/Mick_Bass)\
**Post date:** [February 19, 2015, 12:50am UTC](https://forum.ansible.com/t/math-py/17561/1 "2015-02-19T00:50:46Z")

</div>

I just responded to a closed issue at github, but its a slightly different flavor so I thought I’d mention it here to get some steer.

[https://github.com/ansible/ansible/issues/9833](https://github.com/ansible/ansible/issues/9833)

We need to use some of the methods in the python math stdlib in one of our filter plugins. But that’s not working now because there’s a new math.py within ansible.

I can patch it by adding the methods that we need to ansible’s math.py, but there’s no way for me to get to stdlib anymore without really monkeying with PTYHONPATH, or other fragile approaches.

Could / should the ansible module be named something other than math.py?

---

<div class="post-metadata">

**Author:** ![Toshio\_Kuratomi](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@Toshio\_Kuratomi](https://forum.ansible.com/u/Toshio_Kuratomi)\
**Post date:** [February 19, 2015, 1:13am UTC](https://forum.ansible.com/t/math-py/17561/2 "2015-02-19T01:13:43Z")

</div>

The minimum python version for ansible on the controller is 2.6. So you can (and actually should to prep for python 3 compat) use

from **future** import absolute\_imports

-Toshio

I just responded to a closed issue at github, but its a slightly different flavor so I thought I’d mention it here to get some steer.

[https://github.com/ansible/ansible/issues/9833](https://github.com/ansible/ansible/issues/9833)

We need to use some of the methods in the python math stdlib in one of our filter plugins. But that’s not working now because there’s a new math.py within ansible.

I can patch it by adding the methods that we need to ansible’s math.py, but there’s no way for me to get to stdlib anymore without really monkeying with PTYHONPATH, or other fragile approaches.

Could / should the ansible module be named something other than math.py?

---

<div class="post-metadata">

**Author:** ![Mick\_Bass](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@Mick\_Bass](https://forum.ansible.com/u/Mick_Bass)\
**Post date:** [February 28, 2015, 6:54am UTC](https://forum.ansible.com/t/math-py/17561/3 "2015-02-28T06:54:14Z")

</div>

Toshio -

> from **future** import absolute\_imports

ended up working just fine, thanks for pointing that out.

- Mick
