Popular recipes by Michael Soulier http://code.activestate.com/recipes/users/2712185/2007-02-16T17:10:56-08:00ActiveState Code RecipesDownload a file via Trivial File Transfer Protocol (TFTP) (Python)
2007-02-16T17:10:56-08:00Michael Soulierhttp://code.activestate.com/recipes/users/2712185/http://code.activestate.com/recipes/502226-download-a-file-via-trivial-file-transfer-protocol/
<p style="color: grey">
Python
recipe 502226
by <a href="/recipes/users/2712185/">Michael Soulier</a>
(<a href="/recipes/tags/network/">network</a>).
</p>
<p>The tftpy library provides simple classes for TFTP clients and servers alike. This is as simple as installing this library, instantiating a TftpClient object, and invoking its download() method.</p>
Using python scripts without .py extension in DOS shells (Python)
2006-03-30T07:30:05-08:00Michael Soulierhttp://code.activestate.com/recipes/users/2712185/http://code.activestate.com/recipes/476204-using-python-scripts-without-py-extension-in-dos-s/
<p style="color: grey">
Python
recipe 476204
by <a href="/recipes/users/2712185/">Michael Soulier</a>
(<a href="/recipes/tags/ui/">ui</a>).
</p>
<p>One problem with ending all of your python scripts in .py is that you have to type the full name of the command. On Unix you can symlink to it with the shortened name, or wrap it in a bourne-shell script, or a shell alias. None of these solutions is particularly clean.</p>
<p>On MS Windows, file extensions have much more meaning. In fact, there is an environment variable to control what extensions should be considered executables, to permit them to be run from name, without the extension. This is the PATHEXT environment variable. Add .PY to this, and all of your python scripts can be executed transparently.</p>