|
DSIMA
|
Functions | |
| def | fileLock |
| Locking mechanism. More... | |
| def | log |
| Write a content to the log file. More... | |
| def | cleanLog |
| Clean the log file. More... | |
| def | readCSVFloatList |
| Read a list of floats in a CSV file. More... | |
| def | writeFloatList |
| Write a list of floats in a file. More... | |
| def | writeFloatMatrix |
| Write a list of floats in a file. More... | |
| def | silentCall |
| Call a commend without display. More... | |
| def | clearFolder |
| Clear a folder of all files with a given extension. More... | |
| def | safeCopy |
| Copy a file and check if the copy succeeded. More... | |
| def implementation.simulator.src.tools.cleanLog | ( | filePath = "log.log" | ) |
Clean the log file.
| filePath | Path to the log file. |
| def implementation.simulator.src.tools.clearFolder | ( | path, | |
ext = "" |
|||
| ) |
Clear a folder of all files with a given extension.
| path | Folder path. |
| ext | Extension or list of extension with the dot. |
| def implementation.simulator.src.tools.fileLock | ( | lockFile | ) |
Locking mechanism.
Usage: with fileLock('lockFile.lock'): Source : http://amix.dk/blog/post/19531
| def implementation.simulator.src.tools.log | ( | content, | |
filePath = "log.log", |
|||
alsoPrint = True |
|||
| ) |
Write a content to the log file.
| content | Content to write. |
| filePath | Path to the log file. |
| alsoPrint | Boolean equals to true if print on the screen is desired. |
| def implementation.simulator.src.tools.readCSVFloatList | ( | fileName | ) |
Read a list of floats in a CSV file.
| fileName | Name of the file to read. |
| def implementation.simulator.src.tools.safeCopy | ( | src, | |
| dst, | |||
maxChecks = 3 |
|||
| ) |
Copy a file and check if the copy succeeded.
| src | Source. |
| dst | Destination. |
| maxChecks | Maximum checks and trials. |
| def implementation.simulator.src.tools.silentCall | ( | command | ) |
Call a commend without display.
| command | Command to execute |
| def implementation.simulator.src.tools.writeFloatList | ( | fileName, | |
| floatList | |||
| ) |
Write a list of floats in a file.
| fileName | Name of the file to read. |
| floatList | List of floats. |
| def implementation.simulator.src.tools.writeFloatMatrix | ( | fileName, | |
| floatMatrix | |||
| ) |
Write a list of floats in a file.
| fileName | Name of the file to read. |
| floatMatrix | List of list floats. |