What is the most appropriate way to import freecad in an external python script

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Dave_Elec
Posts: 2
Joined: Tue Jun 04, 2019 6:55 am

What is the most appropriate way to import freecad in an external python script

Postby Dave_Elec » Thu Jun 27, 2019 8:58 am

I was Writing a freecad_to_gazebo/ros exporter and I wanted to use freecad as a module in my python script.

I have seen some ways to import freecad by extending sys.path but the problem is:
1. The freecad libs path is different in different OS's, different distros, and Installations.
2. In some distros have I can't import it from python3 and I can't import it in python2 with the rest.

What is the appropriate way to import freecad in a multiplatform situation?