@@ -1242,7 +1242,7 @@ def get_version(pn_dir):
1242
1242
The version number of the most recent database.
1243
1243
1244
1244
"""
1245
- db_dir = pn_dir .split (os . sep )[0 ]
1245
+ db_dir = pn_dir .split ('/' )[0 ]
1246
1246
url = posixpath .join (download .PN_CONTENT_URL , db_dir )
1247
1247
response = requests .get (url )
1248
1248
contents = [line .decode ('utf-8' ).strip () for line in response .content .splitlines ()]
@@ -1403,7 +1403,7 @@ def edf2mit(record_name, pn_dir=None, delete_file=True, record_only=False):
1403
1403
if pn_dir is not None :
1404
1404
1405
1405
if '.' not in pn_dir :
1406
- dir_list = pn_dir .split (os . sep )
1406
+ dir_list = pn_dir .split ('/' )
1407
1407
pn_dir = posixpath .join (dir_list [0 ], get_version (dir_list [0 ]), * dir_list [1 :])
1408
1408
1409
1409
file_url = posixpath .join (download .PN_INDEX_URL , pn_dir , record_name )
@@ -2131,7 +2131,7 @@ def wav2mit(record_name, pn_dir=None, delete_file=True, record_only=False):
2131
2131
if pn_dir is not None :
2132
2132
2133
2133
if '.' not in pn_dir :
2134
- dir_list = pn_dir .split (os . sep )
2134
+ dir_list = pn_dir .split ('/' )
2135
2135
pn_dir = posixpath .join (dir_list [0 ], get_version (dir_list [0 ]), * dir_list [1 :])
2136
2136
2137
2137
file_url = posixpath .join (download .PN_INDEX_URL , pn_dir , record_name )
@@ -2568,7 +2568,7 @@ def rdheader(record_name, pn_dir=None, rd_segments=False):
2568
2568
dir_name = os .path .abspath (dir_name )
2569
2569
2570
2570
if (pn_dir is not None ) and ('.' not in pn_dir ):
2571
- dir_list = pn_dir .split (os . sep )
2571
+ dir_list = pn_dir .split ('/' )
2572
2572
pn_dir = posixpath .join (dir_list [0 ], get_version (dir_list [0 ]), * dir_list [1 :])
2573
2573
2574
2574
# Read the header file. Separate comment and non-comment lines
@@ -3029,7 +3029,7 @@ def rdsamp(record_name, sampfrom=0, sampto=None, channels=None, pn_dir=None,
3029
3029
3030
3030
"""
3031
3031
if (pn_dir is not None ) and ('.' not in pn_dir ):
3032
- dir_list = pn_dir .split (os . sep )
3032
+ dir_list = pn_dir .split ('/' )
3033
3033
pn_dir = posixpath .join (dir_list [0 ], get_version (dir_list [0 ]), * dir_list [1 :])
3034
3034
3035
3035
record = rdrecord (record_name = record_name , sampfrom = sampfrom ,
@@ -3081,7 +3081,7 @@ def sampfreq(record_name, pn_dir=None):
3081
3081
3082
3082
"""
3083
3083
if (pn_dir is not None ) and ('.' not in pn_dir ):
3084
- dir_list = pn_dir .split (os . sep )
3084
+ dir_list = pn_dir .split ('/' )
3085
3085
pn_dir = posixpath .join (dir_list [0 ], get_version (dir_list [0 ]),
3086
3086
* dir_list [1 :])
3087
3087
@@ -3133,7 +3133,7 @@ def signame(record_name, pn_dir=None, sig_nums=[]):
3133
3133
3134
3134
"""
3135
3135
if (pn_dir is not None ) and ('.' not in pn_dir ):
3136
- dir_list = pn_dir .split (os . sep )
3136
+ dir_list = pn_dir .split ('/' )
3137
3137
pn_dir = posixpath .join (dir_list [0 ], get_version (dir_list [0 ]),
3138
3138
* dir_list [1 :])
3139
3139
@@ -3376,8 +3376,8 @@ def dl_database(db_dir, dl_dir, records='all', annotators='all',
3376
3376
3377
3377
"""
3378
3378
# Full url PhysioNet database
3379
- if os . sep in db_dir :
3380
- dir_list = db_dir .split (os . sep )
3379
+ if '/' in db_dir :
3380
+ dir_list = db_dir .split ('/' )
3381
3381
db_dir = posixpath .join (dir_list [0 ], get_version (dir_list [0 ]), * dir_list [1 :])
3382
3382
else :
3383
3383
db_dir = posixpath .join (db_dir , get_version (db_dir ))
0 commit comments