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 - Python Tutorial
From the course: Building Tools with Python
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Exploring the sample tool3m 6s
-
(Locked)
Using shell commands from Python3m 43s
-
(Locked)
Challenge: Use shell commands in Python52s
-
(Locked)
Solution: Use shell commands in Python2m 4s
-
(Locked)
Accepting arguments6m 31s
-
(Locked)
Challenge: Practice with arguments55s
-
(Locked)
Solution: Practice with arguments1m 28s
-
(Locked)
Providing error messages and logging5m 29s
-
(Locked)
Ensuring functionality2m 53s
-
(Locked)
Challenge: Check for necessary conditions51s
-
(Locked)
Solution: Check for necessary conditions1m 33s
-
(Locked)
Adding a user interface4m 28s
-
(Locked)
Packaging and distributing a tool4m 14s
-
(Locked)
Supporting the tool2m 2s
-
-