Building the request-reply automation system

Finally, we can begin putting theory into practice, and build our request-reply Maya automation system.

We'll start by learning how Python packages work, how to bootstrap Maya from another process, and how process pipes work. After that, we will set up a bare bones client and server. Once that is working, we will add support for exec and eval, exceptions, timeouts, and more.

Creating a Python package

Before writing our code, we need to create some files. Because these files are all closely related, we can put them in a folder and create a Python package.

Start by creating a mayaserver directory in your development root. For this book, that is C:\mayapybook\pylib\mayaserver. Inside, create three empty files: ...

Get Practical Maya Programming with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.