From 18a6346d42988507962d260e88916fd40fec9850 Mon Sep 17 00:00:00 2001 From: Abhishek L Date: Fri, 2 May 2014 19:25:09 +0530 Subject: [PATCH] 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 --- hy/cmdline.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/hy/cmdline.py b/hy/cmdline.py index 6ccbb8f..a29d901 100644 --- a/hy/cmdline.py +++ b/hy/cmdline.py @@ -203,6 +203,7 @@ def run_file(filename): def run_repl(hr=None, spy=False): + import platform sys.ps1 = "=> " sys.ps2 = "... " @@ -210,10 +211,15 @@ def run_repl(hr=None, spy=False): if not hr: hr = HyREPL(spy) - hr.interact("{appname} {version}".format( - appname=hy.__appname__, - version=hy.__version__ - )) + hr.interact("{appname} {version} using " + "{py}({build}) {pyversion} on {os}".format( + appname=hy.__appname__, + version=hy.__version__, + py=platform.python_implementation(), + build=platform.python_build()[0], + pyversion=platform.python_version(), + os=platform.system() + )) return 0