Skip to content

Commit 83ce5e9

Browse files
write unicode in Python 3
1 parent 97f0f45 commit 83ce5e9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

bpython/repl.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,6 +1070,8 @@ def edit_config(self):
10701070
try:
10711071
default_config = pkgutil.get_data('bpython',
10721072
'sample-config')
1073+
if py3: # py3 files need unicode
1074+
default_config = default_config.decode('ascii')
10731075
bpython_dir, script_name = os.path.split(__file__)
10741076
containing_dir = os.path.dirname(
10751077
os.path.abspath(self.config.config_path))

bpython/sample-config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
# save_append_py = False
4646

4747
# The name of a helper executable that should perform pastebin upload on
48-
# bpythons behalf. If unset, bpython uploads pastes to bpaste.net. (default: )
48+
# bpython's behalf. If unset, bpython uploads pastes to bpaste.net. (default: )
4949
#pastebin_helper = gist.py
5050

5151
# How long an undo must be expected to take before prompting for how

0 commit comments

Comments
 (0)