Rathalos commited on
Commit
51c29b8
·
verified ·
1 Parent(s): 4ef420d

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import subprocess
2
+
3
+ def execute_command(command):
4
+ result = subprocess.run(command, shell=True, capture_output=True, text=True)
5
+ return result.stdout, result.stderr
6
+
7
+ if __name__ == "__main__":
8
+ # Esempio di comando da eseguire
9
+ stdout, stderr = execute_command("echo 'Hello, World!'")
10
+ print("Output:", stdout)
11
+ if stderr:
12
+ print("Errors:", stderr)