rtslib/utils.py
def fwrite(path, string):
    '''
    This function writes a string to a file, and takes care of
    opening it and closing it. If the file does not exist, it
    will be created.

    >>> from rtslib.utils import *
    >>> fwrite("/tmp/test", "hello")
    >>> fread("/tmp/test")
    'hello'

    @param path: The file to write to.
    @type path: string
    @param string: The string to write to the file.
    @type string: string

    '''
    with open(path, 'w') as file_fd:
        file_fd.write(str(string))

    This function writes a string to a file, and takes care of
    opening it and closing it. If the file does not exist, it
    will be created.

    >>> from rtslib.utils import *
    >>> fwrite("/tmp/test", "hello")
    >>> fread("/tmp/test")
    'hello'

    @param path: The file to write to.
    @type path: string
    @param string: The string to write to the file.
    @type string: string

    
This function writes a string to a file, and takes care of
opening it and closing it. If the file does not exist, it
will be created.


This function writes a string to a file and takes care of opening it and closing it . If the file does not exist it will be created .
def fwrite(path, string):
    with open(path, 'w') as file_fd:
        file_fd.write(str(string))
def fwrite ( path , string ) : with open ( path , 'w' ) as file_fd : file_fd . write ( str ( string ) )
This function writes a string to a file, and takes care of
opening it and closing it.
This function writes a string to a file and takes care of opening it and closing it .
'''
    This function writes a string to a file, and takes care of
    opening it and closing it. If the file does not exist, it
    will be created.

    >>> from rtslib.utils import *
    >>> fwrite("/tmp/test", "hello")
    >>> fread("/tmp/test")
    'hello'

    @param path: The file to write to.
    @type path: string
    @param string: The string to write to the file.
    @type string: string

    '''
path
The file to write to.
The file to write to .
string
The string to write to the file.
The string to write to the file .