Re: [Tutor] Considering translating bash script to Python to learn

2009-05-12 Thread Dotan Cohen
> 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

Re: [Tutor] Considering translating bash script to Python to learn

2009-05-12 Thread Alan Gauld
"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

Re: [Tutor] Considering translating bash script to Python to learn

2009-05-12 Thread Dotan Cohen
> 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

Re: [Tutor] Considering translating bash script to Python to learn

2009-05-12 Thread spir
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

[Tutor] Considering translating bash script to Python to learn

2009-05-12 Thread Dotan Cohen
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