-1

Could somebody explain the difference between a qi.Session and qi.Application?

I have read the API, but I have been unable to find a detailed answer to my question listed above.

Emile
  • 2,946
  • 2
  • 19
  • 22
Mathews
  • 27
  • 2
  • 1
    Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Mar 13 '23 at 19:44
  • What are imports? Where is `qi` coming from? This is a poor question, please provide context. Without context this is like explaining 500 errors, there are a million reasons for the same issue, but all you see is "500" – ViaTech Mar 14 '23 at 00:59
  • Here is the Link to qi.Session http://doc.aldebaran.com/2-8/dev/libqi/api/python/session.html and here is the link to qi.Application http://doc.aldebaran.com/2-8/dev/libqi/api/python/application.html Everything I need is a detailed explanation about the difference. – Mathews Mar 14 '23 at 09:13

1 Answers1

0

qi.Session is relatively "low level", and can be used as a service directory of sorts. To use it, you need to explicitly pass the URL and port, and connect it.

qi.Application is specifically for running Python scripts/services, and will internally create a qi.Session object with the right parameters based on what has been passed by command line (tho you can also create them explicitly when creating the Application object). You can think of it as a wrapper that sets the session up for you.

Most of the time you'll be manipulated sessions (you can also get one inside choregraphe), the application is only relevant when your top-level script/service is starting or ending.

Emile
  • 2,946
  • 2
  • 19
  • 22