RE: Need Help Creating My First Script 01-11-2014, 06:53 AM
#11
(01-08-2014, 10:45 AM)Geoff Wrote: Well, a shell script would have been fewer lines of code to accomplish the same thing. While both call an interpreter of sorts, Python needs additional modules/libraries and while im not expert on python... I am pretty sure that the os.system() call simply executes a shell command.
So what youve done is written a python script that calls the python interpeter that references an external library that simply pipes the command to the shell interpreter.
a shell script would simply pipe the command to the shell interpreter.
Do you see how this might be considered inefficient? unnecessarily complex? note i said unnecessarily complex, i dont mean that its a complex script lol. Youre right that in reality the size of the script makes this a moot point... i doubt very much you would ever notice a performance issue. But for simple things like this where all you are doing is automating a list of commands, its in my opinion (not that its right), that a simple shell script would be best practice.
Thanks [Geoff] Makes total sense. Thanks for explaining that so clearly.
My programing vision at this point is very cloudy but each problem i run into/learn about helps clear things up.
Cheers


![[+]](https://sinister.li/images/modern/collapse_collapsed.png)
