Skip to content

Commit 69fbfc1

Browse files
committed
Starting to work with Python 3 compatibility.
1 parent 7447638 commit 69fbfc1

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ldtk import LDPSetCreator, LDPSet
2-
from filters import BoxcarFilter, TabulatedFilter
1+
from ldtk.ldtk import LDPSetCreator, LDPSet
2+
from ldtk.filters import BoxcarFilter, TabulatedFilter
33

4-
__all__ = ['LDPSetCreator','LDPSet','BoxcarFilter','TabulatedFilter','ldtk_root']
4+
__all__ = ['LDPSetCreator','LDPSet','BoxcarFilter','TabulatedFilter']

src/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from ftplib import FTP
2121
from itertools import product
2222
from tqdm import tqdm
23-
from core import *
23+
from ldtk.core import *
2424

2525
class Client(object):
2626
def __init__(self, limits=None, verbosity=1, update_server_file_list=False, cache=None):
@@ -128,7 +128,7 @@ def download_uncached_files(self, force=False):
128128
pb.update(1)
129129
else:
130130
if self.verbosity > 1:
131-
print 'Skipping an existing file: ', f.name
131+
print('Skipping an existing file: {:s}'.format(f.name))
132132
ftp.close()
133133

134134

src/ldtk.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
from scipy.interpolate import interp1d
2424
from scipy.optimize import fmin
2525

26-
from ld_models import LinearModel, QuadraticModel, NonlinearModel, GeneralModel, models
27-
from client import Client
28-
from core import *
26+
from ldtk.ld_models import LinearModel, QuadraticModel, NonlinearModel, GeneralModel, models
27+
from ldtk.client import Client
28+
from ldtk.core import *
2929

3030
def load_ldpset(filename):
3131
with open(filename,'r') as fin:
@@ -257,9 +257,9 @@ def set_lims(ms_or_samples, pts, plims=[0.135,100-0.135] ):
257257
teff_lims, logg_lims, metal_lims = limits
258258

259259
if verbose:
260-
print "Teff limits: ", teff_lims
261-
print "logg limits: ", logg_lims
262-
print "Fe/H limits: ", metal_lims
260+
print("Teff limits: " + str(teff_lims))
261+
print("logg limits: " + str(logg_lims))
262+
print("Fe/H limits: " + str(metal_lims))
263263

264264
self.client = c = Client(limits=[teff_lims, logg_lims, metal_lims], cache=cache)
265265
self.files = self.client.local_filenames

0 commit comments

Comments
 (0)