1
0
mirror of https://github.com/satwikkansal/wtfpython synced 2024-12-21 12:20:09 +01:00

* Fix .gitignore issue

* Add pypi package 🚀
This commit is contained in:
Satwik Kansal 2018-01-22 11:15:48 +05:30
parent a612e975ee
commit d325554921
20 changed files with 2274 additions and 0 deletions

0
.gitignore vendored Executable file → Normal file
View File

0
.npmignore vendored Executable file → Normal file
View File

0
LICENSE vendored Executable file → Normal file
View File

0
README.md vendored Executable file → Normal file
View File

0
images/tic-tac-toe/after_board_initialized.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 159 KiB

After

Width:  |  Height:  |  Size: 159 KiB

0
images/tic-tac-toe/after_row_initialized.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

0
mixed_tabs_and_spaces.py Executable file → Normal file
View File

0
package.json vendored Executable file → Normal file
View File

0
wtfpython vendored Executable file → Normal file
View File

Binary file not shown.

2190
wtfpython-pypi/content.md vendored Normal file

File diff suppressed because it is too large Load Diff

BIN
wtfpython-pypi/main.pyc vendored Normal file

Binary file not shown.

41
wtfpython-pypi/setup.py Normal file
View File

@ -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'],
)

View File

BIN
wtfpython-pypi/wtf_python/__init__.pyc vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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 vendored Normal file

Binary file not shown.

8
wtfpython-pypi/wtfpython vendored Normal file
View File

@ -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())