[mythtv-users] running python scripts on OS X against mythtv database?
James Abernathy
jfabernathy at gmail.com
Sat Nov 24 22:52:13 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
>
> --
> Bill
Sometimes going the long way around is easier. I’m sitting here with my Macbook thinking about y’all’s responses and saw the Virtualbox icon in the Dock and remembered I have that installed just to run apps that I can’t find a Mac OS X version but have a Linux version. So I installed mythtv-frontend in the Ubuntu 18.04 virtual machine and that brought in the python bindings. Now my scripts run on my Macbook, sort of :-)
Surprisingly, I testing the frontend in the Virtual Machine and it runs as good as the OS X version fo mythfrontend.
Jim A
> _______________________________________________
> 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
More information about the mythtv-users
mailing list