Skip to content

Commit 5dcb7d5

Browse files
author
geekpradd
committed
Added Python 2 Support and gitignore
1 parent 29e3caa commit 5dcb7d5

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist/
2+
*.egg-info/

PythonPi.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@
1111
Decimal gives the Decimal data type which is much better than Float
1212
sys is needed to set the depth for recursion.
1313
"""
14+
from __future__ import print_function
1415
import math, sys
1516
from decimal import *
1617
getcontext().rounding = ROUND_FLOOR
1718
sys.setrecursionlimit(100000)
18-
if sys.version_info[0] == 2:
19+
20+
python2 = sys.version_info[0] == 2
21+
if python2:
1922
input = raw_input
2023

2124
def factorial(n):

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setup(
99
name = "PythonPi",
10-
version = '1.0.0',
10+
version = '1.0.2',
1111
author = 'Pradipta Bora',
1212
author_email = '[email protected]',
1313
description = "Get the Value of Pi upto as many decimal places as needed",

0 commit comments

Comments
 (0)