Reputation: 151
Are there any TFTP libraries in Python to allow the PUT transfer of binary file to an IP address.
Ideally I would rather use a built in library if this is not possible then calling the cmd via python would be acceptable. Usually if TFTP is installed in windows the command in command prompt would be:
tftp -i xxx.xxx.xxx.xxx put example_filename.bin
One thing to note is that python is 32bit and running on a 64bit machine. I've been unable to run tftp using subprocess.
Upvotes: 3
Views: 3128
Reputation: 1659
You can use TFTPy
TFTPy is a pure Python implementation of the Trivial FTP protocol.
TFTPy is a TFTP library for the Python programming language. It includes client and server classes, with sample implementations. Hooks are included for easy inclusion in a UI for populating progress indicators. It supports RFCs 1350, 2347, 2348 and the tsize option from RFC 2349.
Upvotes: 3