Skip to content

Commit 0669323

Browse files
committed
Fix code that is specific to Windows only. Replace file separator by multi-os one (\\ by os.sep)
1 parent 0ffa95f commit 0669323

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/openalea/strawberry/import_mtgfile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import absolute_import
22
from __future__ import print_function
33

4+
import os
45
import pandas as pd
56
import numpy as np
67
from openpyxl import load_workbook
@@ -269,7 +270,7 @@ def import_mtg_from_csv(files,first_property,symbol_at_scale=dict(P=1,T=2, F=3,
269270
'''
270271
mtgs={}
271272
for file in files:
272-
name= str(file).split('\\')[-1].split(".")[0]
273+
name= str(file).split(os.sep)[-1].split(".")[0]
273274
print(name)
274275
mtg= strawberry_reader_csv(file)
275276
mtgs[name]=mtg

0 commit comments

Comments
 (0)