1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 2<html><head><title>Python: module __init__</title> 3<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 4</head><body bgcolor="#f0f0f8"> 5 6<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> 7<tr bgcolor="#7799ee"> 8<td valign=bottom> <br> 9<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>__init__</strong></big></big></font></td 10><td align=right valign=bottom 11><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:c%3A%5Cusers%5Crennie%5Cgitrepos%5Csynthtool%5Csynthtool%5C__init__.py">c:\users\rennie\gitrepos\synthtool\synthtool\__init__.py</a></font></td></tr></table> 12 <p><tt>Synthtool synthesizes libraries from disparate sources.</tt></p> 13<p> 14<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 15<tr bgcolor="#aa55cc"> 16<td colspan=3 valign=bottom> <br> 17<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> 18 19<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> 20<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="__main__.html">__main__</a><br> 21</td><td width="25%" valign=top><a href="sys.html">sys</a><br> 22</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p> 23<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 24<tr bgcolor="#eeaa77"> 25<td colspan=3 valign=bottom> <br> 26<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> 27 28<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> 29<td width="100%"><dl><dt><a name="-copy"><strong>copy</strong></a> = move(sources: Iterable[Union[str, pathlib.Path]], destination: Union[str, pathlib.Path] = None, excludes: Iterable[Union[str, pathlib.Path]] = None, merge: Callable[[str, str, pathlib.Path], str] = None, required: bool = False) -> bool</dt><dd><tt>copy file(s) at source to current directory, preserving file mode.<br> 30 <br> 31Args:<br> 32 sources (ListOfPathsOrStrs): Glob pattern(s) to copy<br> 33 destination (PathOrStr): Destination folder for copied files<br> 34 excludes (ListOfPathsOrStrs): Glob pattern(s) of files to skip<br> 35 merge (Callable[[str, str, Path], str]): Callback function for merging files<br> 36 if there is an existing file.<br> 37 required (bool): If required and no source files are copied, throws a MissingSourceError<br> 38 <br> 39Returns:<br> 40 True if any files were copied, False otherwise.</tt></dd></dl> 41 <dl><dt><a name="-dont_overwrite"><strong>dont_overwrite</strong></a>(patterns: Iterable[Union[str, pathlib.Path]]) -> Callable[[str, str, pathlib.Path], str]</dt><dd><tt>Returns a merge function that doesn't overwrite the specified files.<br> 42 <br> 43Pass the return value to <a href="#-move">move</a>() or <a href="#-copy">copy</a>() to avoid overwriting existing<br> 44files.</tt></dd></dl> 45 <dl><dt><a name="-move"><strong>move</strong></a>(sources: Iterable[Union[str, pathlib.Path]], destination: Union[str, pathlib.Path] = None, excludes: Iterable[Union[str, pathlib.Path]] = None, merge: Callable[[str, str, pathlib.Path], str] = None, required: bool = False) -> bool</dt><dd><tt>copy file(s) at source to current directory, preserving file mode.<br> 46 <br> 47Args:<br> 48 sources (ListOfPathsOrStrs): Glob pattern(s) to copy<br> 49 destination (PathOrStr): Destination folder for copied files<br> 50 excludes (ListOfPathsOrStrs): Glob pattern(s) of files to skip<br> 51 merge (Callable[[str, str, Path], str]): Callback function for merging files<br> 52 if there is an existing file.<br> 53 required (bool): If required and no source files are copied, throws a MissingSourceError<br> 54 <br> 55Returns:<br> 56 True if any files were copied, False otherwise.</tt></dd></dl> 57 <dl><dt><a name="-replace"><strong>replace</strong></a>(sources: Iterable[Union[str, pathlib.Path]], before: str, after: str, flags: int = <RegexFlag.MULTILINE: 8>) -> int</dt><dd><tt>Replaces occurrences of before with after in all the given sources.<br> 58 <br> 59Returns:<br> 60 The number of times the text was found and replaced across all files.</tt></dd></dl> 61</td></tr></table><p> 62<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 63<tr bgcolor="#55aa55"> 64<td colspan=3 valign=bottom> <br> 65<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> 66 67<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> 68<td width="100%"><strong>__all__</strong> = ['copy', 'move', 'replace', 'dont_overwrite']</td></tr></table> 69</body></html>