Search
 
SCRIPT & CODE EXAMPLE
 

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)
Comment

PREVIOUS NEXT
Code Example
Python :: numpy.where() for substring 
Python :: python urlopen parameters 
Python :: python convert comma separated list of number to float 
Python :: django time cualtulate 
Python :: moviepy not able to read the image file format 
Python :: import curses module in python 
Python :: how to see if something is in a class in python 
Python :: binarize array python 
Python :: tuple with only one element in Python 
Python :: loading kivy lang 
Python :: create image tkinter set active background 
Python :: python loop invalid input 
Python :: read file python 
Python :: wx.SingleInstanceCheckerindexmodules 
Python :: tb to pb with python calculator 
Python :: kinect python exoskeleton 
Python :: online python compailer 
Python :: tcs question 
Python :: open tkinter and cli 
Python :: openpyxl iter_rows skip first 
Python :: pip install matplotlib.pyplot 
Python :: python numpy bbox 
Python :: ascending order in python using bubble sort 
Python :: messe graphen erstellen python 
Python :: split() method, sep=i, n=veces aplicado 
Python :: python heroku 
Python :: pyplot save image 
Python :: python encryption program 
Python :: range() in python 
Python :: json.dump 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =