Display python version & platform at repl startup
*hy/cmdline.py: At the repl startup the Python implementation & version is displayed along with the platform(os) information
This commit is contained in:
parent
ced072bc8d
commit
18a6346d42
@ -203,6 +203,7 @@ def run_file(filename):
|
|||||||
|
|
||||||
|
|
||||||
def run_repl(hr=None, spy=False):
|
def run_repl(hr=None, spy=False):
|
||||||
|
import platform
|
||||||
sys.ps1 = "=> "
|
sys.ps1 = "=> "
|
||||||
sys.ps2 = "... "
|
sys.ps2 = "... "
|
||||||
|
|
||||||
@ -210,10 +211,15 @@ def run_repl(hr=None, spy=False):
|
|||||||
if not hr:
|
if not hr:
|
||||||
hr = HyREPL(spy)
|
hr = HyREPL(spy)
|
||||||
|
|
||||||
hr.interact("{appname} {version}".format(
|
hr.interact("{appname} {version} using "
|
||||||
appname=hy.__appname__,
|
"{py}({build}) {pyversion} on {os}".format(
|
||||||
version=hy.__version__
|
appname=hy.__appname__,
|
||||||
))
|
version=hy.__version__,
|
||||||
|
py=platform.python_implementation(),
|
||||||
|
build=platform.python_build()[0],
|
||||||
|
pyversion=platform.python_version(),
|
||||||
|
os=platform.system()
|
||||||
|
))
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user