Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Traceback (most recent call last):
- File "comandos.py", line 5, in <module>
- datos=info.readlines()
- AttributeError: 'CompletedProcess' object has no attribute 'readlines'
- import subprocess
- comando=("ipconfig")
- info=subprocess.run((comando),shell=True)
- datos=info.readlines()
- fichero=open("datos", "w")
- fichero.writelines(info)
- fichero.close()
- print("El nombre del fichero es datos")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement