Hello,
I'm new to programming for starters, my project is I want to make a python script to auto install all my favorite apps for linux. I'm trying to start the learning process with something simple, I know how to write a shell script using bash to do this because that is pretty straight forward but I want to start learning python so I want to write those same scripts in python code.
I can't find any information as to what code to use to call the correct information such as...
<code>sudo apt-get install geany</code>
How do you write this in a python script to get it to call to the shell do execute it.
Thanks For Your Help.
Python and Shell CommandsHow do I code a shell script using python
Page 1 of 1
2 Replies - 1351 Views - Last Post: 17 November 2008 - 09:38 AM
Replies To: Python and Shell Commands
#2
Re: Python and Shell Commands
Posted 17 November 2008 - 09:20 AM
import os
os.system('sudo apt-get install geany')
Hope that helps,
#3
Re: Python and Shell Commands
Posted 17 November 2008 - 09:38 AM
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|