Skip to content

Commit 4e4b7b4

Browse files
committed
Merge pull request pyreadline#36 from jstenar/pr/25
Extending PR pyreadline#25
2 parents 2b9292e + 539231b commit 4e4b7b4

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

pyreadline/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,15 @@
77
# the file COPYING, distributed as part of this software.
88
#*****************************************************************************
99
from __future__ import print_function, unicode_literals, absolute_import
10+
from platform import system
11+
12+
_S = system()
13+
if 'windows' != _S.lower():
14+
raise RuntimeError('pyreadline is for Windows only, not {}.'.format(_S))
15+
del system, _S
1016

1117
from . import unicode_helper
1218
from . import logger, clipboard, lineeditor, modes, console
1319
from . rlmain import *
20+
1421
from . import rlmain

setup.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
import sys
1313
import glob
1414
from distutils.core import setup
15+
from platform import system
16+
17+
_S = system()
18+
if 'windows' != _S.lower():
19+
raise RuntimeError('pyreadline is for Windows only, not {}.'.format(_S))
1520

1621
# BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
1722
# update it when the contents of directories change.

0 commit comments

Comments
 (0)