Update app.py
Browse files
app.py
CHANGED
|
@@ -5,14 +5,12 @@ import os
|
|
| 5 |
|
| 6 |
command = st.text_input("Command: ", "")
|
| 7 |
commandList = command.split(' ')
|
|
|
|
| 8 |
if(commandList[0] == "cd"):
|
| 9 |
os.chdir(commandList[1])
|
| 10 |
output = subprocess.run(['pwd'], stdout=subprocess.PIPE).stdout.decode('utf-8')
|
| 11 |
st.write(f"{command}: \n {output}")
|
| 12 |
else:
|
| 13 |
-
st.write(f"\"{
|
| 14 |
-
st.write(f"\"{len(commandList)}\"")
|
| 15 |
-
st.write(f"\"{commandList[0]}\"")
|
| 16 |
-
st.write(f"\"{len(commandList[0])}\"")
|
| 17 |
output = subprocess.run(commandList, stdout=subprocess.PIPE).stdout.decode('utf-8')
|
| 18 |
st.write(f"{command}: \n {output}")
|
|
|
|
| 5 |
|
| 6 |
command = st.text_input("Command: ", "")
|
| 7 |
commandList = command.split(' ')
|
| 8 |
+
|
| 9 |
if(commandList[0] == "cd"):
|
| 10 |
os.chdir(commandList[1])
|
| 11 |
output = subprocess.run(['pwd'], stdout=subprocess.PIPE).stdout.decode('utf-8')
|
| 12 |
st.write(f"{command}: \n {output}")
|
| 13 |
else:
|
| 14 |
+
st.write(f"\"{command}\"")
|
|
|
|
|
|
|
|
|
|
| 15 |
output = subprocess.run(commandList, stdout=subprocess.PIPE).stdout.decode('utf-8')
|
| 16 |
st.write(f"{command}: \n {output}")
|