FPGA-Research-Manchester / FABulous

Fabric generator and CAD tools
https://fabulous.readthedocs.io/en/latest/
Apache License 2.0
148 stars 34 forks source link

Use pathlib to extract the file name information #146

Closed IAmMarcelJung closed 9 months ago

IAmMarcelJung commented 9 months ago

This changes the use of split() to the use of the pathlib module where possible. It makes the extraction of information from the path more readable and also fixes a bug occurring when executing runFABulous_bitstream (as mentioned in #130).

The current version also features a function to first check the OS type and then choose which function to use for reading the path depending on the OS. This is optional and could also be removed if it is not needed (does FABulous even run on non UNIX-systems?).

Thanks to @KelvinChung2000 for the suggestion to use pathlib!