From the course: Dynamo for Revit: Python Scripting

Unlock the full course today

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

Extending Python modules

Extending Python modules

From the course: Dynamo for Revit: Python Scripting

Start my 1-month free trial

Extending Python modules

- [Instructor] Python offers many built-in modules that can be imported easily using the Import keyword. To view all of these, we can use a module known as the SYS module. This module is imported by default with Python, and it gives us access to variables and functions that control the Python scripting interface. So in this lesson, let's have a look at how we can use this SYS module to view all of the available built-in modules, as well as import more modules beyond the default available modules. To start, let's go ahead and place a new Python node onto the workspace and open it up. As we can see, SYS is imported by default on line two. This is imported by default in the latest version of Dynamo. Otherwise, you would need to add this line in manually. To start, let's use SYS to view all of the available modules, which we can do through a particular property. So let's assign to the variable OUT sys.builtin_module_ names and…

Contents