Run custom user specific code, if available.
()
| 669 | |
| 670 | |
| 671 | def execusercustomize(): |
| 672 | """Run custom user specific code, if available.""" |
| 673 | try: |
| 674 | try: |
| 675 | import usercustomize # noqa: F401 |
| 676 | except ImportError as exc: |
| 677 | if exc.name == 'usercustomize': |
| 678 | pass |
| 679 | else: |
| 680 | raise |
| 681 | except Exception as err: |
| 682 | if sys.flags.verbose: |
| 683 | sys.excepthook(*sys.exc_info()) |
| 684 | else: |
| 685 | sys.stderr.write( |
| 686 | "Error in usercustomize; set PYTHONVERBOSE for traceback:\n" |
| 687 | "%s: %s\n" % |
| 688 | (err.__class__.__name__, err)) |
| 689 | |
| 690 | |
| 691 | def main(): |