Importing Modules in Python
In this article, we’ll talk about how to get and use code that other people have written in your own programs and libraries.
With the core functionality introduced in the previous articles, we can do pretty much anything we want to do. Doing things from scratch, however, takes either a lot of time or a lot of experience.
- Previous Article
- Next Article
- All Articles
For example, say you wanted to make a program that could generate math-based animations like the ones in my other articles. At a minimum, you would need to
- convert mathematical descriptions of objects into vertices, paths, and planes,
- render those vertices, paths, and planes,
- render text,
- render math equations and formulas,
- allow users to control and plan out scenes,
- and allow users to generate multiple frames that you can then combine into an image.
Even in this description, I’m compressing a lot of implementation details and leaving out some features. While it is possible for one person to do all these things, it’s rarely necessary because people have already done some of these things and given out free access to the code to everyone. In this article, we’re…