(*args, **kwargs)
Read markdown code from a file and write it to a file or a stream.

    This is a shortcut function which initializes an instance of Markdown,
    and calls the convertFile method rather than convert.

    Keyword arguments:

    * input: a file name or readable object.
    * output: a file name or writable object.
    * encoding: Encoding of input and output.
    * Any arguments accepted by the Markdown class.
Read markdown code from a file and write it to a file or a stream.
Read markdown code from a file and write it to a file or a stream .
def markdownFromFile(*args, **kwargs):
    """Read markdown code from a file and write it to a file or a stream.

    This is a shortcut function which initializes an instance of Markdown,
    and calls the convertFile method rather than convert.

    Keyword arguments:

    * input: a file name or readable object.
    * output: a file name or writable object.
    * encoding: Encoding of input and output.
    * Any arguments accepted by the Markdown class.

    """
    # For backward compatibility loop through positional args
    pos = ['input', 'output', 'extensions', 'encoding']
    c = 0
    for arg in args:
        if not kwargs.has_key(pos[c]):
            kwargs[pos[c]] = arg
        c += 1
        if c == len(pos):
            break

    md = Markdown(**kwargs)
    md.convertFile(kwargs.get('input', None),
                   kwargs.get('output', None),
                   kwargs.get('encoding', None))
def markdownFromFile ( * args , * * kwargs ) : # For backward compatibility loop through positional args pos = [ 'input' , 'output' , 'extensions' , 'encoding' ] c = 0 for arg in args : if not kwargs . has_key ( pos [ c ] ) : kwargs [ pos [ c ] ] = arg c += 1 if c == len ( pos ) : break md = Markdown ( * * kwargs ) md . convertFile ( kwargs . get ( 'input' , None ) , kwargs . get ( 'output' , None ) , kwargs . get ( 'encoding' , None ) )