-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
44 lines (33 loc) · 1.06 KB
/
test.py
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
44
import subprocess
import os
import sys
from contextlib import contextmanager
# f = open('log.txt', 'w')
# ps = subprocess.Popen(['ls', '-l'], stdout=subprocess.PIPE)
# output = subprocess.run(['tee', '-a', 'log.txt'], stdin=ps.stdout)
y = subprocess.run(['ls', '-l']).returncode
print ('never ever')
print ('test')
# back_index = words.rfind('/')
# name = words.find('autopen')
# if words[back_index:] != '/autopen':
# print ('not in correct repo')
# print (words[back_index:])
# else:
# print (name)
# print (words[:(name+7)])
# print ('you right')
# print (words)
# f = open('output.txt', 'w')
# # master = subprocess.run(['git', 'rev-parse', 'master'], stdout=subprocess.PIPE)
# # print ((master.stdout).decode('utf-8'))
# # print ('UPDATE FAILED: failed to update tool')
# x = subprocess.run(['sudo', 'apt-get', 'install', 'wireshark']).returncode
# if x != 0:
# print 'did not install'
# else:
# y = subprocess.run(['sudo', 'apt-get', '--only-upgrade', 'install', 'wireshark']).returncode
# if y != 0:
# print 'dk whats going on'
# else:
# print 'hey it worked'