From the course: Building Tools with Python

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Packaging and distributing a tool

Packaging and distributing a tool - Python Tutorial

From the course: Building Tools with Python

Start my 1-month free trial

Packaging and distributing a tool

- [Instructor] Once a tool is ready to be distributed, we need to make sure end users can run it. There's a few different ways of doing this depending on the audience and how the tool works. For some cases, we can just have users invoke the script in a command line environment and use it that way. We can also change the script to be executable so we don't need to specifically call an interpreter for it. Making a script executable on Linux and macOS involves modifying the permissions mode to add an executable bit, chmod +x, and you'll also need to provide a shebang line to tell the shell what interpreter needs to be used when the script is run. And then the script can be run like this without typing the name of the interpreter. Both of these methods let us pass arguments on the command line too if the script accepts them. My Tkinter script doesn't, but the other versions still do. If a script has a shebang and the…

Contents