I have a file, called 'html.html', which contains 'open_skype' in the first line and in the second line it contains the location of the file.
Now, what I want to do is, make a function read the first line and then the second line should be read separately....if you don't understand what I'm trying to say:
open_file=open('html.html','r')
file=open_file.read()
loc_file=open_file()
#I want loc_file to read ONLY the second line, and file to read ONLY the first line
value=''
if file=='shutdown':
os.system('shutdown -s -t 10')
elif file=='open_tweetdeck':
subprocess.call('C:\Program Files\TweetDeck\TweetDeck.exe')
elif file=='open_skype':
subprocess.call(loc_file)
else:
print 'No command given...'
raw_input('Press <enter>')
Is there a way I can do this?
Thanx in advance! ;)