Python API on Windows

I have a custom made BlinkStickPro which works with the Windows Client (Win7-64) and with the Python api in Linux but I’m failing to get the Python api to work in Windows.
I’ve installed Python 2.7.12 and the api as instructed at https://github.com/arvydas/blinkstick-python, but just get errors.
If I run the Example: Set random color i get

C:\Users\Q\Documents\blinkstick>python random.py
Traceback (most recent call last):
File “random.py”, line 1, in
from blinkstick import blinkstick
File “C:\Python27\lib\site-packages\blinkstick\blinkstick.py”, line 14, in
from random import randint
File “C:\Users\Q\Documents\blinkstick\random.py”, line 1, in
from blinkstick import blinkstick
ImportError: cannot import name blinkstick

For info “pip list” reports
BlinkStick (1.1.8)
pip (8.1.2)
pywinusb (0.4.1)
setuptools (20.10.1)

Does anyone have any pointers?
Thanks

Do not name your file random.py. This overwrites the official random.py which is part of the python libs.
Just rename your file to BSrandom.py or so and try it again. This should be the solution for you.

1 Like

I imagined it would be something simple.
Thank you!