Opened 16 years ago
Closed 16 years ago
Last modified 16 years ago
#4600 closed enhancement (fixed)
update/proposal for python bindings
Reported by: | trisooma | Owned by: | Anduin Withers |
---|---|---|---|
Priority: | minor | Milestone: | 0.21 |
Component: | contrib | Version: | head |
Severity: | low | Keywords: | python binding |
Cc: | Ticket locked: | no |
Description
I took the initial (to be) python bindings from trunk/mythplugins/mythvideo/mythvideo/scripts/MythTV.py (xris), pulled it apart and put them in separate files. This is a proposal so this can serve as a base for creating the python bindings...
commnents plz
Attachments (8)
Change History (25)
comment:2 Changed 16 years ago by
Owner: | changed from Isaac Richards to xris |
---|---|
Status: | new → assigned |
comment:3 Changed 16 years ago by
Looks good to me, what's with all the extra whitespace though?
I've been meaning to do this for a while and propose they are moved into mythtv rather than mythplugins. I've got a couple of methods in my tree for storage groups and a bit of other extra stuff too. I'll open a ticket for them separately.
I can see some new command line options in MythDB.py and a new method getAllSettings, are there any other functional changes in there that I've missed?
I believe Anduin had some changes that he hadn't committed but that may be just for find_meta.py, I can't remember.
comment:4 Changed 16 years ago by
What about mythplugins? Language bindings live under mythtv/ in the source.
Changed 16 years ago by
Attachment: | mythtv_python_bindings.diff added |
---|
hads propsed patch to put python bindings in mythtv/
comment:5 Changed 16 years ago by
I've just attached a patch including a simple setup.py to install the python bindings to the Python site-packages. I don't know enough about the build system to add it to configure etc. at this stage. I can look into it if need be.
Also in this patch I've renamed the module names to lower case to be in line with the Python standard library (well what they're aiming for at least). Any comments on this? I figured with a disruptive move like this now would be a good time to suggest it.
This patch also keeps the original whitespace from the current bindings.
comment:6 Changed 16 years ago by
Just added an updated patch which includes changes to the build system to install the python bindings with make install.
I've just copied the build stuff from the perl bindings and updated the configure script etc. I don't really know the build system so if someone could check the changes for me that would be great.
It also includes changes to comments (only) in libs/libmythtv/programinfo.h to reflect the updated location of mythtv.py
Last difference is to import all the module globals into the mythtv namespace in init.py
comment:7 Changed 16 years ago by
this patch is ONLY for the *.py files... dunno if the previous patches are affected by this. I thought that wasn't the case.
Comments added and renamed files. The devs using this package now have a friendlier interface, see interactive_mythtv.py for an example of how to use this package.
hads, can you confirm that my patch doesn't conflict with your patch?
comment:8 Changed 16 years ago by
To be honest, I don't see the point of the last patch. The interface is not really different, you've just moved what I had in the main module to a separate file. I also don't like the renamed module names or classname, MythTV makes more sense than Base.
The description comments aren't standard docstring format and the other comments aren't really necessary or accurate, i.e. author, version and date.
Changed 16 years ago by
Attachment: | mythtv_python_bindings.4.diff added |
---|
Changed 16 years ago by
Attachment: | mythplugins.diff added |
---|
comment:9 Changed 16 years ago by
I've just added mythtv_python_bindings.4.diff, this is based on mythtv_python_bindings.2.diff
The further changes are as follows;
- Splits MythVideo? class into a separate module.
- Adds module and class docstrings.
- Removed some perl related stuff from python.pro that got copied over.
- Adjusts PROTO_VERSION to 39 in line with the current MythTV.py in mythplugins.
- Normalises case of module names to lower in logging instances etc.
- Makes passing of arguments to MythDB optional.
If you'd like smaller split up versions of this diff then let me know.
I've also added a one liner diff for mythplugins which updates find_meta.py to use the lower case name. Tested as working here.
comment:10 Changed 16 years ago by
Owner: | changed from xris to Anduin Withers |
---|
comment:12 Changed 16 years ago by
Milestone: | unknown → 0.21 |
---|---|
Owner: | changed from xris to Anduin Withers |
Un-umm oops.
Changed 16 years ago by
Attachment: | mythtv_python_bindings.5.diff added |
---|
comment:13 Changed 16 years ago by
Sorry, forgot to svn add the mythvideo.py module. mythtv_python_bindings.5.diff includes this.
Database component