We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
J. Wright got filterbank.py working in Python 3, but it required some changes due to how Py3 handles strings. Here's the diff:
151c151 < f = open(filename, 'r') --- > f = open(filename, 'rb') 154c154 < header_str = '' --- > header_str = b"" 159,160c159,160 < if 'HEADER_START' in header_sub: < idx_start = header_sub.index('HEADER_START') + len('HEADER_START') --- > if b"HEADER_START" in header_sub: > idx_start = header_sub.index(b"HEADER_START") + len(b"HEADER_START") 163c163 < if 'HEADER_END' in header_sub: --- > if b"HEADER_END" in header_sub: 165c165 < idx_end = header_sub.index('HEADER_END') --- > idx_end = header_sub.index(b"HEADER_END") 181c181 < f = open(filename, 'r') --- > f = open(filename, 'rb') 188,189c188,189 < if 'HEADER_END' in header_sub: < idx_end = header_sub.index('HEADER_END') + len('HEADER_END') --- > if b"HEADER_END" in header_sub: > idx_end = header_sub.index(b"HEADER_END") + len(b"HEADER_END") 212c212,213 < for keyword in header_keyword_types.keys(): --- > for keyword_str in list(header_keyword_types.keys()): > keyword = keyword_str.encode("utf-8") 214c215 < dtype = header_keyword_types.get(keyword, 'str') --- > dtype = header_keyword_types.get(keyword_str, 'str') 216c217 < dtype = header_keyword_types[keyword] --- > dtype = header_keyword_types[keyword_str] 219c220 < header_dict[keyword] = val --- > header_dict[keyword_str] = val 222c223 < header_dict[keyword] = val --- > header_dict[keyword_str] = val 226c227 < header_dict[keyword] = str_val --- > header_dict[keyword_str] = str_val.decode("utf-8") 230,231c231 < < if keyword == 'src_raj': --- > if keyword_str == 'src_raj': 235c235 < header_dict[keyword] = val --- > header_dict[keyword_str] = val 312,313c312,313 < print dd.shape < print n_ints, n_ifs, n_chans --- > print(dd.shape) > print(n_ints, n_ifs, n_chans) 334c334 < for key, val in self.header.items(): --- > for key, val in list(self.header.items()): 339c339 < print "%16s : %32s" % (key, val) --- > print("%16s : %32s" % (key, val)) 431c431 < print plot_data.shape, plot_f.shape --- > print(plot_data.shape, plot_f.shape) 487c487 < print "Start freq: %2.2f" % args.f_start --- > print("Start freq: %2.2f" % args.f_start) 491c491 < print "Stop freq: %2.2f" % args.f_stop --- > print("Stop freq: %2.2f" % args.f_stop) 494,495c494,495 < print "Error: Start and stop frequencies must lie inside file's frequency range." < print "i.e. between %2.2f-%2.2f MHz." % (fil.freqs[0], fil.freqs[-1]) --- > print("Error: Start and stop frequencies must lie inside file's frequency range.") > print("i.e. between %2.2f-%2.2f MHz." % (fil.freqs[0], fil.freqs[-1]))
Probably requires some Py2/Py3 conditionals in the code
The text was updated successfully, but these errors were encountered:
Note to self: We have almost certainly broken py3 support.
Sorry, something went wrong.
I think we fixed Py3 support so closing issue. Can open again if we break it again.
Add GitHub Actions (#3)
6653652
Replace Travis CI with Github Actions.
No branches or pull requests
J. Wright got filterbank.py working in Python 3, but it required some changes due to how Py3 handles strings. Here's the diff:
Probably requires some Py2/Py3 conditionals in the code
The text was updated successfully, but these errors were encountered: