The Python script is kept more or less very simple. Just copy this into a
file, make it executable and put it in your $PATH. Maybe you need to modify
the python version to the one you use. This script is written for 2.5 < python
< 3.x. Feel free to optimize the following lines. It was just a lash up.

"""""
#!/usr/bin/env python2.7

from glob import glob as gl
from sys import argv


if str(argv[1]) in ["-h","--help"]:
        print "syntax : "+ str(argv[0]) + " <file> char char_to_change_into"
        print "\te.g. "+ str(argv[0]) + " test.dat , . "
        print "\te.g. "+ str(argv[0]) + " .dat , . "
else:
        FILES=gl("*"+str(argv[1]))
        print FILES # to be sure having fetched the right one(s)
        for NAME in FILES:
                fid=file(NAME,"r")
                CONTEXT=fid.readlines()
                for i in range(len(CONTEXT)):
                        CONTEXT[i]=CONTEXT[i].replace(str(argv[2]),str(argv[3]))
                fid.close()
                fid=file(NAME,"w+")
                for i in CONTEXT:
                        fid.write(i)
                fid.close()
"""""

On  0, Andrés Muñiz Piniella <[email protected]> wrote:
> Re: hotkeys
> I thought gwyddion had hot keys already with the _File for example but
> it does not seem to work on either ubuntu or windows. I don't do many
> mechanical things but when I do I agree it does come in handy. The
> problem is general hotkeys might have conflicts with other OS commands
> but that is something I guess can be solved by each individual. Or
> maybe there is a way to assign your own hotkey to the command you use.
> 
> re: gnuplot
> would you mind sharing the python script you use? If it's not too big
> please share it in mailing list
> 
> On 6/29/11, Mathias Müller <[email protected]> wrote:
> > Hi,
> >
> > as I was working with gwyddion quite often in the last days, I realized that
> > hotkeys or key combination for calling certain functions would be really
> > nice.
> >
> > i.e. ctrl/alt + p ==> call profile function etc.
> >
> >
> > An other point is, that gwyddion exports profiles "gnuplot friendly" which
> > are aside the x-y columns not really friendly to gnuplot due to the ',' !=
> > '.'
> > problem. Right know I just run a python script on these profile files, but
> > it would be nice if gwyddion could export these gnuplot-friendly files with
> > '.' to mark decimal places.
> >
> > I think the last suggestion is no big deal. But I do not know whether you
> > think hotkeys are useful for other users too.
> >
> > Mathias
> >
> >
> > ------------------------------------------------------------------------------
> > All of the data generated in your IT infrastructure is seriously valuable.
> > Why? It contains a definitive record of application performance, security
> > threats, fraudulent activity, and more. Splunk takes this data and makes
> > sense of it. IT sense. And common sense.
> > http://p.sf.net/sfu/splunk-d2d-c2
> > _______________________________________________
> > Gwyddion-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/gwyddion-users
> >
> 
> 
> -- 
> Andrés Muñiz-Piniella
> 
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security 
> threats, fraudulent activity, and more. Splunk takes this data and makes 
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> Gwyddion-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gwyddion-users


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Gwyddion-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gwyddion-users

Reply via email to