File tree Expand file tree Collapse file tree 4 files changed +3
-9
lines changed Expand file tree Collapse file tree 4 files changed +3
-9
lines changed Original file line number Diff line number Diff line change 30
30
import math
31
31
import re
32
32
import time
33
- import inspect
34
33
import signal
35
34
import struct
36
35
import termios
49
48
from bpython .formatter import BPythonFormatter
50
49
51
50
# This for completion
52
- from bpython import inspection
53
51
from bpython import importcompletion
54
52
55
53
# This for config
Original file line number Diff line number Diff line change 33
33
import os
34
34
import sys
35
35
from locale import LC_ALL , getpreferredencoding , setlocale
36
- from xmlrpclib import ServerProxy , Error as XMLRPCError
37
- from string import Template
38
- from urllib import quote as urlquote
39
36
40
37
import gobject
41
38
import gtk
Original file line number Diff line number Diff line change 39
39
except AttributeError :
40
40
has_collections_callable = False
41
41
try :
42
- import types
43
42
types .InstanceType
44
43
has_instance_type = True
45
44
except AttributeError :
Original file line number Diff line number Diff line change @@ -617,7 +617,7 @@ def reevaluate(self):
617
617
if py3 :
618
618
self .stdout_hist += line + '\n '
619
619
else :
620
- self .stdout_hist += line .encode (getpreferredencoding ()) + '\n '
620
+ self .stdout_hist += line .encode (locale . getpreferredencoding ()) + '\n '
621
621
self .print_line (line )
622
622
self .s_hist [- 1 ] += self .f_string
623
623
# I decided it was easier to just do this manually
@@ -628,7 +628,7 @@ def reevaluate(self):
628
628
self .iy , self .ix = self .scr .getyx ()
629
629
630
630
self .cpos = 0
631
- indent = next_indentation (self .s , self .config .tab_length )
631
+ indent = repl . next_indentation (self .s , self .config .tab_length )
632
632
self .s = ''
633
633
self .scr .refresh ()
634
634
@@ -652,7 +652,7 @@ def write(self, s):
652
652
t = s
653
653
654
654
if not py3 and isinstance (t , unicode ):
655
- t = t .encode (getpreferredencoding ())
655
+ t = t .encode (locale . getpreferredencoding ())
656
656
657
657
if not self .stdout_hist :
658
658
self .stdout_hist = t
You can’t perform that action at this time.
0 commit comments