Skip to main content
rdscliff
Associate III
July 12, 2016
Question

Python scripting for BlueNRG

  • July 12, 2016
  • 3 replies
  • 1315 views
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?
This topic has been closed for replies.

3 replies

marchese.graziella
Visitor II
July 13, 2016
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

Dhaval Malav
Associate II
December 8, 2016
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

marchese.graziella
Visitor II
December 12, 2016
Posted on December 12, 2016 at 11:38

Dear Customer,

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

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

Thank you. That was very helpful.

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

Very useful. Thank you