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 3030import math
3131import re
3232import time
33- import inspect
3433import signal
3534import struct
3635import termios
4948from bpython .formatter import BPythonFormatter
5049
5150# This for completion
52- from bpython import inspection
5351from bpython import importcompletion
5452
5553# This for config
Original file line number Diff line number Diff line change 3333import os
3434import sys
3535from 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
3936
4037import gobject
4138import gtk
Original file line number Diff line number Diff line change 3939except AttributeError :
4040 has_collections_callable = False
4141try :
42- import types
4342 types .InstanceType
4443 has_instance_type = True
4544except AttributeError :
Original file line number Diff line number Diff line change @@ -617,7 +617,7 @@ def reevaluate(self):
617617 if py3 :
618618 self .stdout_hist += line + '\n '
619619 else :
620- self .stdout_hist += line .encode (getpreferredencoding ()) + '\n '
620+ self .stdout_hist += line .encode (locale . getpreferredencoding ()) + '\n '
621621 self .print_line (line )
622622 self .s_hist [- 1 ] += self .f_string
623623# I decided it was easier to just do this manually
@@ -628,7 +628,7 @@ def reevaluate(self):
628628 self .iy , self .ix = self .scr .getyx ()
629629
630630 self .cpos = 0
631- indent = next_indentation (self .s , self .config .tab_length )
631+ indent = repl . next_indentation (self .s , self .config .tab_length )
632632 self .s = ''
633633 self .scr .refresh ()
634634
@@ -652,7 +652,7 @@ def write(self, s):
652652 t = s
653653
654654 if not py3 and isinstance (t , unicode ):
655- t = t .encode (getpreferredencoding ())
655+ t = t .encode (locale . getpreferredencoding ())
656656
657657 if not self .stdout_hist :
658658 self .stdout_hist = t
You can’t perform that action at this time.
0 commit comments