Skip to content
Permalink
Browse files

Added placeholder for yorkshire4 support package.

  • Loading branch information...
freakboy3742 committed Jan 13, 2018
1 parent ca41953 commit e8318b91e099c2e7badb89b5d04540461658ddfe
Showing with 152 additions and 2 deletions.
  1. +61 −2 .gitignore
  2. +7 −0 MANIFEST.in
  3. +44 −0 setup.py
  4. +9 −0 yorkshire4/__init__.py
  5. +31 −0 yorkshire4/terminal.py
@@ -1,2 +1,61 @@
_build
local
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# OSX useful to ignore
*.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# IntelliJ Idea family of suites
.idea
*.iml
## File-based project format:
*.ipr
*.iws
## mpeltonen/sbt-idea plugin
.idea_modules/

docs/_build/
local/
@@ -0,0 +1,7 @@
include beekeeper.yml
include LICENSE
recursive-include docs *.bat
recursive-include docs *.jpg
recursive-include docs *.py
recursive-include docs *.rst
recursive-include docs Makefile
@@ -0,0 +1,44 @@
#!/usr/bin/env python
import io
import re
from setuptools import setup, find_packages


with io.open('./yorkshire4/__init__.py', encoding='utf8') as version_file:
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file.read(), re.M)
if version_match:
version = version_match.group(1)
else:
raise RuntimeError("Unable to find version string.")


with io.open('README.rst', encoding='utf8') as readme:
long_description = readme.read()


setup(
name='yorkshire4',
version=version,
description="A support library for the Yorkshire4 games",
long_description=long_description,
author='Russell Keith-Magee',
author_email='russell@keith-magee.com',
url='https://yorkshire4.readthedocs.io/',
license='New BSD',
packages=find_packages(exclude=['tests']),
install_requires=[],
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Software Development',
'Topic :: Utilities',
],
# test_suite='tests'
)
@@ -0,0 +1,9 @@
# Examples of valid version strings
# __version__ = '1.2.3.dev1' # Development release 1
# __version__ = '1.2.3a1' # Alpha Release 1
# __version__ = '1.2.3b1' # Beta Release 1
# __version__ = '1.2.3rc1' # RC Release 1
# __version__ = '1.2.3' # Final Release
# __version__ = '1.2.3.post1' # Post Release 1

__version__ = '0.0.0'
@@ -0,0 +1,31 @@
import sys

# Define a utility method to clear the screen.
# This uses "ANSI Escape Sequences" - special combinations of
# characters that are understood by the terminal, but are difficult
# (or impossible) to type on a keyboard. `\033[` is the
# "escape sequence"; the characters after the escape sequnce are
# interpreted as commands. In this case, we're using:
# 2J - clear screen; and
# H - move the cursor to the Home position (top left corner)
#
# For more details about ANSI escape sequences, see:
# https://en.wikipedia.org/wiki/ANSI_escape_code
#
def clear_screen():
print('\033[2J\033[H', end='')
sys.stdout.flush()


# Use the ?25l ANSI escape code to hide the cursor, and ?12h to turn off
# local echo. This means we won't be able to see what keys we type.
def hide_cursor():
print('\033[?25l\033[?12h')
sys.stdout.flush()


# Use the ?25h ANSI escape code to restore the cursor,
# and ?12l to turn on local echo
def show_cursor():
print('\033[?25h\033[?12l')
sys.stdout.flush()

0 comments on commit e8318b9

Please sign in to comment.
You can’t perform that action at this time.