<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 24, 2018, at 4:53 PM, Bill Meek <<a href="mailto:keemllib@gmail.com" class="">keemllib@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On 11/24/18 3:26 PM, James Abernathy wrote:<br class=""><blockquote type="cite" class="">I have some scripts that work on my Ubuntu systems that print data from the mythtv backend and database.<br class="">I have a Macbook Pro that I run Mythfrontend and XQuartz for maintenance of the backend. I’d like to run some python scripts.<br class="">How do I link up all the modules so I don’t get errors like:<br class=""> File "./find_recording_inputs.py", line 13, in <module><br class=""> from MythTV import exceptions, MythBE<br class="">ImportError: No module named MythTV<br class=""></blockquote><br class="">If you know where the MythTV Python bindings are installed, then you can<br class="">do this:<br class=""><br class="">export PYTHONPATH=/directory/where/the/bindings/are/installed<br class=""><br class="">This would display the directories in use:<br class=""><br class="">echo -e "import sys\nfor p in sys.path:\n\tprint p" | python<br class=""><br class="">-- <br class=""></div></div></blockquote><div><br class=""></div>On my system the echo above shows this:</div><div><br class=""></div><div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Abernathys-iMac:~ mlabernathy$ echo -e "import sys\nfor p in sys.path:\n\tprint p" | python</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco; min-height: 14px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/Library/Python/2.7/site-packages</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">I have no idea where the bindings for mythtv are.</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Jim A</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><blockquote type="cite" class=""><div class=""><div class="">Bill<br class="">_______________________________________________<br class="">mythtv-users mailing list<br class=""><a href="mailto:mythtv-users@mythtv.org" class="">mythtv-users@mythtv.org</a><br class="">http://lists.mythtv.org/mailman/listinfo/mythtv-users<br class="">http://wiki.mythtv.org/Mailing_List_etiquette<br class="">MythTV Forums: https://forum.mythtv.org<br class=""></div></div></blockquote></div><br class=""></body></html>