...Entering this data into tax software like TurboTax is tedious and error prone. Some institutions provide limited export capabilities such as CSV or excel export but this is not easy to translate into tax preparation software.
These python scripts convert two simple to generate input files BuyLots.csv and Sales.csv into a .TXF file that can be imported into tax prep software and a second RemainingLots.csv that can be used for next year. The scripts automatically calculate the First In First Out lots for every sale and properly tag them in the TXF format ( https://turbotax.intuit.com/txf/TXF042.jsp ).
...