diff options
Diffstat (limited to 'meta/recipes-devtools/python/python3/sitecustomize.py')
-rw-r--r-- | meta/recipes-devtools/python/python3/sitecustomize.py | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/meta/recipes-devtools/python/python3/sitecustomize.py b/meta/recipes-devtools/python/python3/sitecustomize.py deleted file mode 100644 index 4c8b5e2ba3..0000000000 --- a/meta/recipes-devtools/python/python3/sitecustomize.py +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | # OpenEmbedded sitecustomize.py (C) 2002-2008 Michael 'Mickey' Lauer <mlauer@vanille-media.de> | ||
2 | # GPLv2 or later | ||
3 | # Version: 20081123 | ||
4 | # Features: | ||
5 | # * set proper default encoding | ||
6 | # * enable readline completion in the interactive interpreter | ||
7 | # * load command line history on startup | ||
8 | # * save command line history on exit | ||
9 | |||
10 | import os | ||
11 | |||
12 | def __exithandler(): | ||
13 | try: | ||
14 | readline.write_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) ) | ||
15 | except IOError: | ||
16 | pass | ||
17 | |||
18 | def __registerExitHandler(): | ||
19 | import atexit | ||
20 | atexit.register( __exithandler ) | ||
21 | |||
22 | def __enableReadlineSupport(): | ||
23 | readline.set_history_length( 1000 ) | ||
24 | readline.parse_and_bind( "tab: complete" ) | ||
25 | try: | ||
26 | readline.read_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) ) | ||
27 | except IOError: | ||
28 | pass | ||
29 | |||
30 | import sys | ||
31 | try: | ||
32 | import rlcompleter, readline | ||
33 | except ImportError: | ||
34 | pass | ||
35 | else: | ||
36 | __registerExitHandler() | ||
37 | __enableReadlineSupport() | ||