This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: '\n' escape character print before the Py_GetCompiler version
Type: enhancement Stage: resolved
Components: Versions: Python 3.7, Python 2.7
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: SilentGhost, amitgb14, eric.snow, steve.dower
Priority: normal Keywords: patch

Created on 2016-11-01 08:48 by amitgb14, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
getcompiler.c.patch amitgb14, 2016-11-01 10:14 review
Messages (5)
msg279861 - (view) Author: Amit Ghadge (amitgb14) * Date: 2016-11-01 09:07
When I hit sys.version command on Linux shell the Py_GetCompiler version print '\n' character like;

'3.7.0a0 (default:7aa001a48120, Nov  1 2016, 13:53:25) \n[GCC 5.3.1 20160406 (Red Hat 5.3.1-6)]'

And When I launch python, Py_GetCompiler line print to the next line,

[aghadge@localhost build]$ ./python 
Python 3.7.0a0 (default:7aa001a48120+, Nov  1 2016, 14:05:04)
[GCC 5.3.1 20160406 (Red Hat 5.3.1-6)] on linux
msg279864 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2016-11-01 09:40
And how exactly are you "hitting sys.version command"?
msg279868 - (view) Author: Amit Ghadge (amitgb14) * Date: 2016-11-01 10:14
Actually, I run this in Python terminal,

>>> import sys
>>> import sys.version

I also have attached patch, Please let me that is correct or not?
msg279869 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2016-11-01 10:32
sys.version is a string, it's intended to be printed and it needs \n to be able to output two lines. I'm not sure what exactly problem you're having, but if you want special characters like \n not to show in output, you should use

>>> print(sys.version)

I'm going to close this issue.
msg279891 - (view) Author: Amit Ghadge (amitgb14) * Date: 2016-11-01 18:58
SilentGhost, Thanks for your response.
History
Date User Action Args
2022-04-11 14:58:38adminsetgithub: 72764
2016-11-01 18:58:57amitgb14setmessages: + msg279891
2016-11-01 10:32:05SilentGhostsetstatus: open -> closed
resolution: rejected
messages: + msg279869

stage: resolved
2016-11-01 10:14:43amitgb14setfiles: + getcompiler.c.patch
keywords: + patch
messages: + msg279868
2016-11-01 09:40:40SilentGhostsetnosy: + SilentGhost

messages: + msg279864
versions: - Python 3.4
2016-11-01 09:07:50amitgb14setnosy: + eric.snow, steve.dower

messages: + msg279861
versions: + Python 2.7, Python 3.4
2016-11-01 08:48:28amitgb14create