提交 d3255549 编写于 作者: S Satwik Kansal

* Fix .gitignore issue

* Add pypi package 🚀
上级 a612e975
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
此差异已折叠。
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'],
)
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()
#!/usr/bin/env python3
import sys
from wtf_python.main import load_and_read
if __name__ == "__main__":
sys.exit(load_and_read())
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册