Browse Source

* Fix .gitignore issue

* Add pypi package 🚀
pull/56/head
Satwik Kansal 4 years ago
parent
commit
d325554921
  1. 0
      .gitignore
  2. 0
      .npmignore
  3. 0
      LICENSE
  4. 0
      README.md
  5. 0
      images/tic-tac-toe/after_board_initialized.png
  6. 0
      images/tic-tac-toe/after_row_initialized.png
  7. 0
      mixed_tabs_and_spaces.py
  8. 0
      package.json
  9. 0
      wtfpython
  10. BIN
      wtfpython-pypi/__pycache__/main.cpython-35.pyc
  11. 2190
      wtfpython-pypi/content.md
  12. BIN
      wtfpython-pypi/main.pyc
  13. 41
      wtfpython-pypi/setup.py
  14. 0
      wtfpython-pypi/wtf_python/__init__.py
  15. BIN
      wtfpython-pypi/wtf_python/__init__.pyc
  16. BIN
      wtfpython-pypi/wtf_python/__pycache__/__init__.cpython-35.pyc
  17. BIN
      wtfpython-pypi/wtf_python/__pycache__/main.cpython-35.pyc
  18. 35
      wtfpython-pypi/wtf_python/main.py
  19. BIN
      wtfpython-pypi/wtf_python/main.pyc
  20. 8
      wtfpython-pypi/wtfpython

0
.gitignore

0
.npmignore

0
LICENSE

0
README.md

0
images/tic-tac-toe/after_board_initialized.png

Before

Width:  |  Height:  |  Size: 159 KiB

After

Width:  |  Height:  |  Size: 159 KiB

0
images/tic-tac-toe/after_row_initialized.png

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

0
mixed_tabs_and_spaces.py

0
package.json

0
wtfpython

BIN
wtfpython-pypi/__pycache__/main.cpython-35.pyc

Binary file not shown.

2190
wtfpython-pypi/content.md

File diff suppressed because it is too large

BIN
wtfpython-pypi/main.pyc

Binary file not shown.

41
wtfpython-pypi/setup.py

@ -0,0 +1,41 @@
from setuptools import setup, find_packages
if __name__ == "__main__":
setup(name='wtfpython',
version='0.1.3',
description='What the f*ck Python!',
author="Satwik Kansal",
maintainer="Satwik Kansal",
maintainer_email='satwikkansal@gmail.com',
url='https://github.com/satwikkansal/wtfpython',
platforms='any',
license="WTFPL 2.0",
long_description="An interesting collection of subtle & tricky Python Snippets"
" and features.",
keywords="wtfpython gotchas snippets tricky",
packages=find_packages(),
entry_points = {
'console_scripts': ['wtfpython = wtf_python.main:load_and_read']
},
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Environment :: MacOS X',
'Environment :: Win32 (MS Windows)',
'Intended Audience :: Science/Research',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: End Users/Desktop',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 2',
'Topic :: Documentation',
'Topic :: Education',
'Topic :: Scientific/Engineering',
'Topic :: Software Development'],
)

0
wtfpython-pypi/wtf_python/__init__.py

BIN
wtfpython-pypi/wtf_python/__init__.pyc

Binary file not shown.

BIN
wtfpython-pypi/wtf_python/__pycache__/__init__.cpython-35.pyc

Binary file not shown.

BIN
wtfpython-pypi/wtf_python/__pycache__/main.cpython-35.pyc

Binary file not shown.

35
wtfpython-pypi/wtf_python/main.py

@ -0,0 +1,35 @@
import pydoc
try:
from urllib.request import urlretrieve
except ImportError:
from urllib import urlretrieve
url = ("https://raw.githubusercontent.com/satwikkansal/"
"wtfpython/master/README.md")
file_name = "content.md"
def fetch_updated_doc():
try:
print("Fetching the latest version...")
urlretrieve(url, file_name)
print("Done!")
except Exception as e:
print(e)
print("Uh oh, failed to check for the latest version, "
"using the local version for now.")
def render_doc():
with open(file_name, 'r') as f:
content = f.read()
pydoc.pager(content)
def load_and_read():
fetch_updated_doc()
render_doc()
if __name__== "__main__":
load_and_read()

BIN
wtfpython-pypi/wtf_python/main.pyc

Binary file not shown.

8
wtfpython-pypi/wtfpython

@ -0,0 +1,8 @@
#!/usr/bin/env python3
import sys
from wtf_python.main import load_and_read
if __name__ == "__main__":
sys.exit(load_and_read())
Loading…
Cancel
Save