Set 'copyright' and 'credits' in builtins
()
| 412 | |
| 413 | |
| 414 | def setcopyright(): |
| 415 | """Set 'copyright' and 'credits' in builtins""" |
| 416 | builtins.copyright = _sitebuiltins._Printer("copyright", sys.copyright) |
| 417 | if sys.platform[:4] == 'java': |
| 418 | builtins.credits = _sitebuiltins._Printer( |
| 419 | "credits", |
| 420 | "Jython is maintained by the Jython developers (www.jython.org).") |
| 421 | else: |
| 422 | builtins.credits = _sitebuiltins._Printer("credits", """\ |
| 423 | Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands |
| 424 | for supporting Python development. See www.python.org for more information.""") |
| 425 | files, dirs = [], [] |
| 426 | # Not all modules are required to have a __file__ attribute. See |
| 427 | # PEP 420 for more details. |
| 428 | here = getattr(sys, '_stdlib_dir', None) |
| 429 | if not here and hasattr(os, '__file__'): |
| 430 | here = os.path.dirname(os.__file__) |
| 431 | if here: |
| 432 | files.extend(["LICENSE.txt", "LICENSE"]) |
| 433 | dirs.extend([os.path.join(here, os.pardir), here, os.curdir]) |
| 434 | builtins.license = _sitebuiltins._Printer( |
| 435 | "license", |
| 436 | "See https://www.python.org/psf/license/", |
| 437 | files, dirs) |
| 438 | |
| 439 | |
| 440 | def sethelper(): |