How to export Panels Everywhere template code to a module I would like to export a Panels Everywhere site template to code. I know you get some configuration code when you select the export tab, but I'm not sure how you turn that into a module that will generate the template with it's variants and layout on another environment.
You can try features module.

The features module enables the capture and management of features in Drupal. A feature is a collection of Drupal entities which taken together satisfy a certain use-case.
Features provides a UI and API for taking different site building components from modules with exportables and bundling them together in a single feature module. A feature module is like any other Drupal module except that it declares its components (e.g. views, contexts, CCK fields, etc.) in its .info file so that it can be checked, updated, or reverted programmatically.

the features module converts every entity (views, content types, ...) in to a module and it can easily be installed and modified every where.