Skip to content

Commit

Permalink
fixed python 3 import
Browse files Browse the repository at this point in the history
  • Loading branch information
rutgerfick committed Feb 19, 2018
1 parent 3aae08a commit cee51ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dmipy/data/saved_acquisition_schemes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from os.path import join
import os
import pkg_resources
import urllib2
from urllib import urlopen
from ..core.acquisition_scheme import (
acquisition_scheme_from_bvalues,
acquisition_scheme_from_gradient_strengths,
Expand Down Expand Up @@ -81,7 +81,7 @@ def isbi2015_white_matter_challenge_scheme():
"http://cmic.cs.ucl.ac.uk/wmmchallenge/ISBIdata/seenScheme.txt")
filename = 'isbi_schemefile.txt'

response = urllib2.urlopen(path_schemefile)
response = urlopen(path_schemefile)
data = response.read()
file_ = open(join(isbi_data_path, filename), 'w')
file_.write(data)
Expand Down
4 changes: 2 additions & 2 deletions dmipy/data/saved_data.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from os.path import join
import os
import urllib2
from urllib import urlopen
import pkg_resources
import nibabel as nib
import numpy as np
Expand Down Expand Up @@ -165,7 +165,7 @@ def isbi2015_white_matter_challenge():
paths = [path_genu, path_fornix]

for filename, path in zip(filenames, paths):
response = urllib2.urlopen(path)
response = urlopen(path)
data = response.read()
file_ = open(join(isbi_data_path, filename), 'w')
file_.write(data)
Expand Down

0 comments on commit cee51ae

Please sign in to comment.