X Tutup
Skip to content

Commit cda7ab8

Browse files
committed
Made pastebin url configurable
1 parent 146c434 commit cda7ab8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

bpython/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,7 @@ def write2file(self):
11401140
def pastebin(self):
11411141
"""Upload to a pastebin and display the URL in the status bar."""
11421142

1143-
pasteservice_url = 'http://bpaste.net/'
1143+
pasteservice_url = OPTS.pastebin_url
11441144
pasteservice = ServerProxy(urljoin(pasteservice_url, '/xmlrpc/'))
11451145

11461146
s = self.getstdout()

bpython/config.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ def loadini(struct, configfile):
4040
'hist_length': 100,
4141
'paste_time': 0.02,
4242
'syntax': True,
43-
'tab_length': 4
43+
'tab_length': 4,
44+
'pastebin_url': 'http://bpaste.net'
4445
},
4546
'keyboard': {
4647
'clear_line': 'C-u',
@@ -81,6 +82,8 @@ def loadini(struct, configfile):
8182
struct.exit_key = config.get('keyboard', 'exit')
8283
struct.last_output_key = config.get('keyboard', 'last_output')
8384

85+
struct.pastebin_url = config.get('general', 'pastebin_url')
86+
8487
color_scheme_name = config.get('general', 'color_scheme')
8588

8689
if color_scheme_name == 'default':

0 commit comments

Comments
 (0)
X Tutup