cancel
Showing results for 
Search instead for 
Did you mean: 

Python scripting for BlueNRG

rdscliff
Associate II
Posted on July 12, 2016 at 20:24

Can BlueNRG scripting work as a full Python program?  Questions I have:

  • Can scripts be run in a normal Python debug environment rather than using BlueNRG_Script_Launcher to run?
  • Can I import standard Python modules into my BlueNRG GUI script?
  • Is there a BlueNRG module or package I can import to add Bluetooth capabilities to a normal Python program?
5 REPLIES 5
Posted on July 13, 2016 at 14:30

Dear customer,

I'll try to give a feedback to you:

•Can scripts be run in a normal Python debug environment rather than using BlueNRG_Script_Launcher to run?

- No the scripts written for BlueNRG device cannot be runned in a normat Python debug because they contain special command understanding only using BlueNRG_Script_Launcher or GUI.

•Can I import standard Python modules into my BlueNRG GUI script?

Yes, you can import any standard Python modules into BlueNRG GUI script.

•Is there a BlueNRG module or package I can import to add Bluetooth capabilities to a normal Python program?

No

Regards,

Graziella Marchese

rdscliff
Associate II
Posted on July 13, 2016 at 22:24

Thank you. That was very helpful.

Mk Sundaram
ST Employee
Posted on July 25, 2016 at 10:46

Very useful. Thank you

Posted on December 08, 2016 at 20:24

Hi,

I tried to include very simple package 'import json' in the script and it failed. Would appreciate if you let me know why I am facing the issue. As per your answer above, python scripts are normal python and should be able to include any python packages.

My question:

https://community.st.com/0D50X00009XkYcaSAF

Posted on December 12, 2016 at 11:38

Dear Customer,

normally the import works, probably you have any problem with json package.