Applying best practices to tutorials (or having a best practices example)?

I finally read through all of the links from the github wiki page. Good information. That said, it did not answer the particular question of “structuring python code”.

From ros.org, there is the suggestion of the following directory structure:

packagename
 |- src/
    |- packagename/
      |- __init__.py
      |- yourfiles.py

Thus, you end up with something like this:

~/catkin_ws/src/package/src/package/file.py

The extra package/ folder seems overly redundant. This extra level does not exist in the C++ guide. I could not find an explanation as to why it is recommended for python.