> Thats rarely a good approach. While you can replace bash with Python you
> will just wind up calling a bunch of external programs and thats what shell
> scripts are best at.
That is why is has been a bash script until now.
> The only time its worthwhile is where the bash code is
> structurally
"Dotan Cohen" wrote
I am considering translating a homegrown bash script to Python to
learn the language.
Thats rarely a good approach. While you can replace bash
with Python you will just wind up calling a bunch of external
programs and thats what shell scripts are best at. The only
tim
> I think you should first keep these very pdf-specific tasks the way
> they are. Use the subprocess module to launch os commands. So
> that you can concentrate on translating the overall logic into python,
> which should not be too hard, probably.
This is what I thought, thanks.
--
Dotan Cohen
Le Tue, 12 May 2009 11:26:00 +0300,
Dotan Cohen s'exprima ainsi:
> I am considering translating a homegrown bash script to Python to
> learn the language. The script grabs different specific pages of
> either a ODF or PDF file (I can use either as the input file, based on
> Python's abilities), c
I am considering translating a homegrown bash script to Python to
learn the language. The script grabs different specific pages of
either a ODF or PDF file (I can use either as the input file, based on
Python's abilities), combines it with an HTML file, rotates,
rearranges, then sends the whole thi