Re: bash command inside script

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

 



* El 04/06/07 a las 16:49, Joao S. O. Bueno Calligaris chamullaba:

> On Sunday 03 June 2007 22:47, Luis A. Florit wrote:
> > Hi,
> >
> >     Is there a way to read the output of a bash command inside
> > a script-fu? I want to make a script-fu that uses the ExifTool
> > program output.
> >
> >     Thanks!
> >
> >         Luis.
> >
> two words:
> go python
>
> ---------
> Seriously. Script-fu has the advantage that it can have a small
> itnerpreter which can therefore live inside GIMP's source tree. And
> that is it. Of course, it fits whoever likes solving puzzles on how
> to perform simple tasks such as parsing a string letter by letter, or
> getting the output of a file.
>
> Python is a full featured language, which greatest advantage is to
> allow one to concentrate on his problem instead of the language.
>
> Just check some of the python-fu examples that come with GIMP itself.
>
> Use the "os"  module to be able to spawn sub-proccess and read the
> output, like in:]
> > > > import os
> > > > files  = os.popen ("ls devel/gimp").readlines()
> > > > for file in files:
> ...   print file.upper()
> ...
> ACINCLUDE.M4
>
> ACLOCAL.M4
>
> APP
>
> AUTHORS
> (in time: the >>> and ... are prompts put ther by the interactive
> interpreter, not part of the language itself)
>
>   js
>   -><-


> 
_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux