bug-recutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-recutils] Python support


From: Maninya M
Subject: Re: [bug-recutils] Python support
Date: Mon, 22 Jul 2013 11:23:42 +0530

Hi,
Please check the Python branch of the git gnu savannah recutils project.

1) I have written the functions for database, rset and record, sexes and fexes (not complete). Still some functions to upload, have some small changes to do. 

2) I am not exactly sure which of these will need to be exposed in Python. So could you please clarify about these functions:
    a) The duplicate functions.
    b) Functions that get/set elements, msets (I think we don't need to expose msets).
    c) Comment functions.
    d) Integrity checks, for a database alone is enough?
    e) Encryption routines for field and record.
    f) Aggregate functions.
    
I have tried to keep the naming convention to use only underscores and lowercase. However, for the Typeobject, since I may have a function to get the type of the record set, like rset_type(), I have kept the type name as rsetType. Let me know how you would want this to be changed. 
It may be better if you could tell me what functions/functionality are *absolutely* necessary in Python. I will modify accordingly. Thanks.
    


On 22 July 2013 11:01, Maninya M <address@hidden> wrote:
Hi,
Please check the Python branch of git gnu savannah recutils project.

1) I have written the functions for database, rset and record, sexes and fexes (not complete).

2) I am not exactly sure which will be needed in Python. So could you please clarify about these:




On 10 July 2013 21:48, Maninya M <address@hidden> wrote:
    Hi,

    1) Please check the stubs file which contains some functions that
    would be used in Python. I have begun writing functions to parse files
    first. The function RecDb_loadfile() loads a rec file into the
    database. Please let me know to what level the C functions need to be
    exposed in Python.

- The recutils.c file will compile into a pythong module, isnt it?  That
  is a shared object.  Is that correct?

   - Yes. The shared object is created in the the dist-packages directory
      of the python installation.  
 
- Please follow the GNU coding standards for C code contributed for
  recutils.  This including formatting rules, naming, indentation, etc.
  See www.gnu.org/prep/standards for details.

- I would prefer to use lower case letters and underscores for C
  identifiers, even if the convention in Python/C seems to be different.
  Mixed case is not a good idea in case-sensitive languages.
   
    - Ok, I am making necessary changes. 

    2) Please let me know if this approach is alright.

Look correct to me.

   - Ok, I will upload the rest of the functions too.
   
    3) Shall I use pip for installation? Setup.py seems a bit messy, and
    we can't uninstall easily.

Care to elaborate?  What is pip and how does it differentiates to having
a setup.py file?
 
    - pip is a tool used for installing Python packages. While installing using 
      "python setup.py install" I found that uninstalling was not readily supported, plus 
       installing different versions was not possible. This was making testing/comparing
       a bit tiresome. When I tried to find a work around, I read that pip could do all these things. 
       So I asked the question because I thought I had to use a different script than setup.py. But 
       I have used it and found that we use the same setup.py file, we just install using a pip 
       command. So there will not be any change in the setup file to use pip. Also using 
       virtualenv (which installs pip automatically), which creates isolated Python environments 
       makes it much easier to run different installations. :) So this question was more about 
       what tool I can use...it's the same for the end user.


Also, I would much prefer you to work in a branch in the official
recutils repo.  In this way we can integrate the plugin in the recutils
source tree right from the beginning, substituting the preliminary work
I did in the recutils/python subdirectory.

You will need to create a savannah account first, and then request
membership to the 'recutils' project.  Tell me when that is done so I
can add you to the project and create the branch.

   - Thanks, yes will do. 



--
Maninya



--
Maninya



--
Maninya

reply via email to

[Prev in Thread] Current Thread [Next in Thread]