Where is the Python startup banner defined?

后端 未结 2 561
小蘑菇
小蘑菇 2021-01-05 19:10

I\'m compiling several different versions of Python for my system, and I\'d like to know where in the source the startup banner is defined so I can change it for each versio

2条回答
  •  灰色年华
    2021-01-05 19:38

    Looks like if you add a mercurial tag before you build, then default will be replaced with the name of your tag (source: Modules/getbuildinfo.c : _Py_hgidentifier())

    Basically seems like it chooses the name default because that is the name of the branch. Looks like the interpreter is built with the tag name, if one exists, or the name of the branch if no tag (besides tip) exists on the current working copy.

提交回复
热议问题