Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python to open .seg file

file1 = open('f1.seg', "w")
file2 = open('f2.seg', "w")

with open('ankle.seg','r') as f:
    for line in f:
        for word in line.split():
            if word == 'S0':
            file1.write(word)
        elif word == 'S1':
            file2.write(word)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #open #file
ADD COMMENT
Topic
Name
2+4 =