-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsheet.py
More file actions
43 lines (30 loc) · 837 Bytes
/
sheet.py
File metadata and controls
43 lines (30 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/python3
import os
import pandas as pd
os.system('sudo apt-get install python3-pip')
data= pd.read_excel("test1.xlsx",sheet_name=0)
print(data)
var=os.system('sudo apt-get update')
if var == 0:
data.iloc[0,data.columns.get_loc('asds')]='pass'
else:
data.iloc[0,data.columns.get_loc('asds')]='fail'
print(data.head())
gr=os.system('dpkg --list|grep -i osd')
if gr == 0:
data.iloc[1,data.columns.get_loc('asds')]='pass'
else:
data.iloc[1,data.columns.get_loc('ads')]='fail'
print(data)
data.to_excel("test1.xlsx",index=False)
upgrad=os.system('sudo unattended-upgrades -d')
if upgrad == 0:
print("success")
else:
print('failure')
store=os.system('dpkg --list | grep -i osd-proxy')
key='HOME'
curr=os.getenv(key)
print(curr)
print("------------------------------------------------")
print(dir(os))