mailRe: [bug #20916] Suggestion for python script for PNG/EPS/SVG conversion of grace files


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on June 19, 2013 - 14:40:
Hi Troels,

Again I have a few fixes to suggest.  One is because of my own
mistake.  The chmod() function call requires the file_name value
rather than the closed file handle.  This results in the following
error:

  File 
"/data/relax/branches/relax_disp/specific_analyses/relax_disp/disp_data.py",
line 525, in plot_disp_curves
    chmod(file, S_IEXEC)
TypeError: coercing to Unicode: need string or buffer, file found

This is only a small part of the full traceback.  Note that you will
need the full path to the file, and not just the file name.  Running
the following quick test will show the problem:

$ relax -s Relax_disp

The other problem is the permissions on the file are not correctly set
in the pipe_control.palmer module!  The correct way to do it is as in
the ./specific_analyses/relax_disp/cpmgfit.py file in the relax_disp
branch.  I will have to fix the pipe_control.palmer code.  Without
this change, the file is executable, but no longer readable or
writable.

I can also see that you've extended the functionality of the script by
checking for lowercase user input.  This should be in a second
separate commit.  The reason is because it happens that sometimes a
better way is found of doing something, and then the original commit
is reverted.  Or a problem in the original commit is found and
reverted.  If that commit contains more than it should, then
functionality will be permanently lost.  Each commit should only
contain one idea or concept.

Cheers,

Edward


On 19 June 2013 14:13, Troels E. Linnet
<NO-REPLY.INVALID-ADDRESS@xxxxxxx> wrote:
Follow-up Comment #7, bug #20916 (project relax):

Fix for bug #20916 (https://gna.org/bugs/?20916) Suggestion for python 
script
for PNG/EPS/SVG conversion of grace files

Optimized according to
(http://thread.gmane.org/gmane.science.nmr.relax.devel/3953)

The argparse module is only available from python 2.7, which now has been
shifted to optparse, available from python 2.3.

Improved that both small and big letters for image types can be used.

Added that the script is made executable in linux.

(file #18118)
    _______________________________________________________

Additional Item Attachment:

File name: pathc5                         Size:7 KB


    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?20916>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel



Related Messages


Powered by MHonArc, Updated Wed Jun 19 15:20:09 2013