Hi I have a quick question to ask. I am trying to figure out how FROM" and "IMPORT" are used in some files. In the given code for service server (on 12-course project): "from imu_topic_susbcriber import ImuTopicReader" where "imu_topic_susbcriber" seems the node name and the "ImuTopicReader" is the class name. It dosen't say the name of the python file which has the class "ImuTopicReader". Can anybody explain what is "imu_topic_susbcriber" here. 1) Is that the name of the python file as well? (so that "imu_topic_susbcriber.py" is the file of the class "ImuTopicReader") 2) or it just the name of the node defined in the file?


asked 15 May, 15:33

awanthas%40yahoo.com's gravatar image

accept rate: 0%

Hi @awanthasyahoocom,

imu_topic_susbcriber is the name of the Python file where you have that class.

Please note: the python file that contains the line from imu_topic_susbcriber import ImuTopicReader has to be the in the same directory as imu_topic_susbcriber.py.

permanent link

answered 20 May, 11:47

bayodesegun%40bayodesegun.com's gravatar image

accept rate: 37%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 15 May, 15:33

question was seen: 409 times

last updated: 20 May, 11:47

powered by OSQA