lcm-proj / lcm

Lightweight Communications and Marshalling
GNU Lesser General Public License v2.1
944 stars 385 forks source link

lcmgen python: import only the package when the package init is generated #491

Closed judfs closed 4 months ago

judfs commented 4 months ago

My second attempt at #470. The python tests pass though I'd like to see this tested with a larger project using lcm.

judfs commented 3 months ago

This broke generating when there is no package in the .lcm file and no package is provide via cli. In this case it produces the line

import  

I suppose in this case the package is treated as empty string. Should be easy to fix