Skip to content

Commit 6af3e9e

Browse files
safe commit
1 parent 9c9c605 commit 6af3e9e

File tree

3 files changed

+34
-4
lines changed

3 files changed

+34
-4
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
a.out
1+
a.out
2+
pyoverflow-cli
3+
pyoverflow.tar.gz

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,16 @@ A Command Line Tool for Unix Based Operating Systems to instantly open Stack Ove
33

44

55

6-
gcc -Wall -I/usr/include/python3.12 main.c -lpython3.12 -o pyoverflow-cli
6+
gcc -Wall -I/usr/include/python3.12 main.c -lpython3.12 -o pyoverflow-cli
7+
8+
#Install Pyenv
9+
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
10+
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
11+
export PATH=~/.pyenv/bin:/usr/local/hadoop/bin/:$PATH
12+
echo 'export PYENV_ROOT="~/.pyenv"' >> ~/.bash_profile
13+
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
14+
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
15+
16+
#Install Python
17+
pyenv install 2.7.18
18+
pyenv virtualenv 2.7.18 pyoverflow

search.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,18 @@
1-
2-
print("hello")
1+
#!/usr/bin/env python
2+
3+
import pyoverflow
4+
5+
a = input("Enter first number")
6+
7+
b = input("Enter second number")
8+
9+
10+
try:
11+
div = a/b
12+
print(div)
13+
14+
except Exception as e:
15+
#Error message and number of solutions
16+
pyoverflow.submit_err(str(e),2)
17+
18+
#Wait for the magic :)

0 commit comments

Comments
 (0)