py3port: 2to3 on all files
This commit is contained in:
parent
c3182f2bcb
commit
4e7a8332f8
4 changed files with 11 additions and 1040 deletions
1029
btc-ticker
1029
btc-ticker
File diff suppressed because it is too large
Load diff
|
|
@ -42,12 +42,12 @@ def do_system(cmd,testing=False,shell=False):
|
|||
|
||||
def get_url(url,gzip_ok=False,proxy=None,timeout=60,verbose=False,debug=False):
|
||||
if debug:
|
||||
print 'get_url():'
|
||||
print ' url', url
|
||||
print ' gzip_ok:',gzip_ok, 'proxy:',proxy, 'timeout:',timeout, 'verbose:',verbose
|
||||
import pycurl,cStringIO
|
||||
print('get_url():')
|
||||
print(' url', url)
|
||||
print(' gzip_ok:',gzip_ok, 'proxy:',proxy, 'timeout:',timeout, 'verbose:',verbose)
|
||||
import pycurl,io
|
||||
c = pycurl.Curl()
|
||||
c_out = cStringIO.StringIO()
|
||||
c_out = io.StringIO()
|
||||
c.setopt(pycurl.WRITEFUNCTION,c_out.write)
|
||||
c.setopt(pycurl.TIMEOUT,timeout)
|
||||
c.setopt(pycurl.FOLLOWLOCATION,True)
|
||||
|
|
@ -118,4 +118,4 @@ def display_big_digits(s,pre='',suf=''):
|
|||
|
||||
if __name__ == '__main__':
|
||||
num = '2345.17'
|
||||
print display_big_digits(num,pre='+ ',suf=' +')
|
||||
print(display_big_digits(num,pre='+ ',suf=' +'))
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ opts_data = lambda: {
|
|||
|
||||
cmd_args = opts.init(opts_data)
|
||||
|
||||
colors = ['\033[38;5;%s;1m' % c for c in 238,240,242,244,246,247,249,251,253,255]
|
||||
colors = ['\033[38;5;%s;1m' % c for c in (238,240,242,244,246,247,249,251,253,255)]
|
||||
_red,_reset = '\033[31m','\033[0m'
|
||||
|
||||
ERASE_ALL,ERASE_LINE,CUR_HOME,CUR_HIDE,CUR_SHOW = \
|
||||
|
|
@ -94,12 +94,12 @@ t.start()
|
|||
def do_loop():
|
||||
global data
|
||||
while True:
|
||||
raw_input()
|
||||
input()
|
||||
with lock:
|
||||
ids = [str(d['id']) for d in data]
|
||||
msg('{}{}{}ACTIVE PEERS ({})'.format(CUR_HOME,ERASE_ALL,CUR_HOME,len(data)))
|
||||
msg(' '+'\n '.join(['{:>3}: {:30} {}'.format(*[d[k] for k in 'id','addr','subver']) for d in data]))
|
||||
reply = raw_input('Enter a peer number to disconnect> ')
|
||||
msg(' '+'\n '.join(['{:>3}: {:30} {}'.format(*[d[k] for k in ('id','addr','subver')]) for d in data]))
|
||||
reply = input('Enter a peer number to disconnect> ')
|
||||
if reply == '':
|
||||
pass
|
||||
elif reply in ids:
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -25,7 +25,7 @@ class my_install_data(install_data):
|
|||
def run(self):
|
||||
sdir = os.path.join('data_files','audio')
|
||||
for f in [e for e in os.listdir(sdir) if e[-4:] == '.wav']:
|
||||
os.chmod(os.path.join(sdir,f),0644)
|
||||
os.chmod(os.path.join(sdir,f),0o644)
|
||||
install_data.run(self)
|
||||
|
||||
setup(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue