[ros-users] [Discourse.ros.org] [general] Applying best practices to tutorials (or having a best practices example)?

suforeman ros.discourse at gmail.com
Mon Jan 16 19:19:53 UTC 2017




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.






---
[Visit Topic](https://discourse.ros.org/t/applying-best-practices-to-tutorials-or-having-a-best-practices-example/1108/3) or reply to this email to respond.




More information about the ros-users mailing list