[mythtv-users] running python scripts on OS X against mythtv database?

James Abernathy jfabernathy at gmail.com
Sun Nov 25 11:24:53 UTC 2018


> On Nov 24, 2018, at 4:53 PM, Bill Meek <keemllib at gmail.com> wrote:
> 
> On 11/24/18 3:26 PM, James Abernathy wrote:
>> I have some scripts that work on my Ubuntu systems that print data from the mythtv backend and database.
>> I have a Macbook Pro that I run Mythfrontend and XQuartz for maintenance of the backend. I’d like to run some python scripts.
>> How do I link up all the modules so I don’t get errors like:
>>   File "./find_recording_inputs.py", line 13, in <module>
>>     from MythTV import exceptions, MythBE
>> ImportError: No module named MythTV
> 
> If you know where the MythTV Python bindings are installed, then you can
> do this:
> 
> export PYTHONPATH=/directory/where/the/bindings/are/installed
> 
> This would display the directories in use:
> 
> echo -e "import sys\nfor p in sys.path:\n\tprint p" | python
> 
> -- 

On my system the echo above shows this:

Abernathys-iMac:~ mlabernathy$ echo -e "import sys\nfor p in sys.path:\n\tprint p" | python

/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC
/Library/Python/2.7/site-packages

I have no idea where the bindings for mythtv are.

Jim A

> Bill
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20181125/81a3a449/attachment.html>


More information about the mythtv-users mailing list