yoctopuce / yoctolib_python

Official Yoctopuce Library for Python
https://www.yoctopuce.com/EN/article/how-to-start-in-python-with-yoctopuce-modulesp
20 stars 12 forks source link

Allow the use of yocto_api as a Python package #4

Closed LudovicRousseau closed 6 years ago

LudovicRousseau commented 6 years ago

The idea is to install the wrapper with a minimal impact in the site-packages directory.

I also provide a Python script to install the files.

Once the wrapper is installed it can be used with a simple line:

from yocto_api.yocto_colorled import *
LudovicRousseau commented 6 years ago

Another idea after this change is to rename yocto_colorled into colorled. Since the file is inside the yocto_api/ directory there is no name conflict.

From a Python script file just do:

from yocto_api.colorled import *
yoctopuce commented 6 years ago

Hi,

Few years ago, when we started this library we had no experience in python and we chose this unconventional file structure, because it is most similar to C++ and PHP language and make our libraries homogeneous

Your modifications are interesting, but we will not apply these changes. Here is why:

I hope that you understand our position.

LudovicRousseau commented 6 years ago

I did not know the PyPI package. I suggest to mention it in http://www.yoctopuce.com/FR/libraries.php or at least in the README.md file of this project.

yoctopuce commented 6 years ago

I've updated the README.md.